Azure UploadFromFileAsync returns bad request
<p>I am trying to simply upload a file using the CloudFileClient but running into what seems like an odd response.  I took the sample code directly from the Azure sample File Store project that comes with the SDK.</p>

<p>My code does exactly the same steps:</p>

<pre><code>string connection = CloudConfigurationManager.GetSetting("AzureFileStorage");
CloudStorageAccount storageAccount = CloudStorageAccount.Parse(connection);

// Create a CloudFileClient object for credentialed access to File storage.
CloudFileClient fileClient = storageAccount.CreateCloudFileClient();

// Get a reference to the file share we created previously.
CloudFileShare share = fileClient.GetShareReference("documents");
await share.CreateIfNotExistsAsync();

// Get a reference to the root directory of the share.        
CloudFileDirectory root = share.GetRootDirectoryReference();

// Put files in this user's folder
CloudFileDirectory dir = root.GetDirectoryReference(User.Identity.GetUserId());
await dir.CreateIfNotExistsAsync();

// Save the document to Azure File Storage
if (System.IO.File.Exists(model.DocumentPath))
{
    CloudFile file = dir.GetFileReference(model.DocumentPath);
    await file.UploadFromFileAsync(model.DocumentPath, FileMode.Open);
}
</code></pre>

<p>The last line returns a 400 bad request.  I check in my Azure portal that the sub-directory was successfully made, and I can manually upload files through the azure portal, but when I try the sample code and I know the file path is good, the async call always gives me a yellow page with a 400.</p>

<p>I am not using datetimes, my container name doesn't start with a capital letter, the file I am trying to upload is only a few K</p>

<p>The Storage Uri in the CloudFile is
    StorageUri  {Primary = '<a href="https://mydomain.file.core.windows.net/documents/" rel="nofollow">https://mydomain.file.core.windows.net/documents/</a>/C:%5Cdev%5Creadme.txt'; Secondary = ''}</p>