I started experiencing this after an upgrade to 4.0.1.0 via nuget package manager. I then upgraded to 4.1.0.0 hoping it may be a bug, but still same issue.
I am using the Cloud-based azure storage, NOT the emulator.
I was previously using 3.0.3.0 and it worked, and still works when I switch to this version.
This is the whole method (basically copying a blob from one container to another)
public string CopyBlobs(string blobPath)
{
var storageAccount = new CloudStorageAccount(new StorageCredentials(_storageAccountName, _storageAccountKey), true);
var cloudBlobClient = storageAccount.CreateCloudBlobClient();
var destContainer = cloudBlobClient.GetContainerReference(cloudBlobClient.BaseUri + _publishBlobContainer);
destContainer.CreateIfNotExists();
BlobContainerPermissions containerPermissions = new BlobContainerPermissions();
containerPermissions.PublicAccess = BlobContainerPublicAccessType.Blob;
destContainer.SetPermissions(containerPermissions);
var src = GetSasUrl(blobPath);
CloudBlockBlob srcBlob = new CloudBlockBlob(new Uri(src));
CloudBlockBlob destBlob;
destBlob = destContainer.GetBlockBlobReference(srcBlob.Name);
destBlob.StartCopyFromBlob(srcBlob);
return destBlob.StorageUri.PrimaryUri.ToString();
}
And this is where is throwing the exception:
destContainer.CreateIfNotExists();
UPDATE: Fiddler logs when I call the method above.
Request:
HEAD
https://accountname.blob.core.windows.net/https://accountname.blob.core.windows.net/published-clips?restype=container HTTP/1.1
User-Agent: WA-Storage/4.1.0 (.NET CLR 4.0.30319.34014; Win32NT 6.2.9200.0)
x-ms-version: 2014-02-14
x-ms-client-request-id: b60edc19-7d8f-4d6b-b264-0c98b9cb157d
x-ms-date: Thu, 26 Jun 2014 12:43:29 GMT
Authorization: SharedKey accountname:key
Host: accountname.blob.core.windows.net
Connection: Keep-Alive
Response:
HTTP/1.1 400 The requested URI does not represent any resource on the server.
Transfer-Encoding: chunked
Server: Microsoft-HTTPAPI/2.0
x-ms-request-id: 85015e32-fdcf-4398-af23-83ddf8a27c1b
Access-Control-Expose-Headers: x-ms-request-id
Access-Control-Allow-Origin: *
Date: Thu, 26 Jun 2014 12:43:31 GMT