I am trying to use the Azure File Service preview as a mapped drive between my two instances of a cloud service and I came across the following blog post with some details:

http://blogs.msdn.com/b/windowsazurestorage/archive/2014/05/12/introducing-microsoft-azure-file-service.aspx?CommentPosted=true#commentmessage

I have signed up for the preview version of the storage account and created a new storage account and verified that the file endpoint is included. I then use the following code to attempt to create the share programmatically:

CloudStorageAccount account = CloudStorageAccount.Parse(System.Configuration.ConfigurationManager.AppSettings["SecondaryStorageConnectionString"].ToString());
CloudFileClient client = account.CreateCloudFileClient();
CloudFileShare share = client.GetShareReference("SCORM");
try
{
  share.CreateIfNotExistsAsync().Wait();
}
catch (AggregateException e)
{
  var test = e.Message;
  var test1 = e.InnerException.Message;
}

On the CreateIfNotExistsAsync().Wait() method I am getting a Aggregate exception and when I look at the Inner details it just says The remote server returned an error: (400) Bad Request.

1

There are 1 best solutions below

0
On

Your comment is the correct answer. Please refer to Naming and Referencing Shares, Directories, Files, and Metadata article for more information.