I've got an ASP.NET application that needs to read and write from an Azure Fileshare. I cannot set permissions directly on the Azure Fileshare, rather, I have the storage account key and primary access key.
I can get on my server and use the "net use" command to mount the fileshare as a drive. Because of the answer to a previous question, I know that ASP.NET will not be able to see the mounted drive.
I was able to get this to work from my local machine, running IIS under my local user and adding the azure storage account file share to the credential manager, but this does not work on the server, so I'm missing some piece of the puzzle.
On the server, if I try to access the share using
Directory.Exists(@"\\storageaccountkey.file.core.windows.net\sharename");
this does not work from ASP.NET (I suspect this is because ASP.NET is unable to authenticate to the share). Running this code from LINQpad does work and returns true.
I have tried adding the credentials to the credential manager and running my application pool under the user who I'm running the credential manager under, but I still get a 'false' returned from the Directory.Exists().
Why can I not see the directory on the server?