core icon indicating copy to clipboard operation
core copied to clipboard

Azure cloud storage can not be accessed from Websharper

Open AndreiDegtiarev opened this issue 6 years ago • 2 comments

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 avatar Dec 23 '18 13:12 AndreiDegtiarev

@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.

Jand42 avatar Jan 03 '19 08:01 Jand42

@AndreiDegtiarev Is this still an issue or can we close this ticket?

granicz avatar Mar 04 '20 18:03 granicz