core
core copied to clipboard
Azure cloud storage can not be accessed from Websharper
In additional .net framework library following code is implemented:
let storageAccount = CloudStorageAccount.Parse(<your connection string>)
let myClient = storageAccount.CreateCloudFileClient()
let cloudFileShare = myClient.GetShareReference(<you share name>)
let rootDirectory = cloudFileShare.GetRootDirectoryReference()
let list = rootDirectory.ListFilesAndDirectories() |> Array.ofSeq
If the library that contains this code is called from non websharper applications (like console application), everything is OK. If the same is done from Websharper server side code, exception "connection refused" occurs with following stack trace: bei System.Net.Sockets.Socket.DoConnect(EndPoint endPointSnapshot, SocketAddress socketAddress) bei System.Net.ServicePoint.ConnectSocketInternal(Boolean connectFailure, Socket s4, Socket s6, Socket& socket, IPAddress& address, ConnectSocketState state, IAsyncResult asyncResult, Exception& exception)
@AndreiDegtiarev Are you running your application from IIS Express? That may have some limitations handling outside connections/certificates. I have found this older SO question on this, might be still relevant.
@AndreiDegtiarev Is this still an issue or can we close this ticket?