Can't create blob container on Azure Blob Storage
Posted
by desautelsj
on Stack Overflow
See other posts from Stack Overflow
or by desautelsj
Published on 2010-05-27T21:34:08Z
Indexed on
2010/05/27
23:21 UTC
Read the original article
Hit count: 546
Azure
|blobstorage
The following code throws an error on the "CreateIfNotExist" method call. I am attempting to connect to my Azure Blob storage and create a new container called "images"
var storageAccount = new CloudStorageAccount(
new StorageCredentialsAccountAndKey("my_account_name", "... my shared key ..."),
"https://blob.core.windows.net/",
"https://queue.core.windows.net/",
"https://table.core.windows.net/"
);
var blobClient = storageAccount.CreateCloudBlobClient();
var blobContainer = blobClient.GetContainerReference("images");
blobContainer.CreateIfNotExist();
The error is:
[StorageClientException: The requested URI does not represent any resource on the server.]
The "images" container does not exist but I was expecting it to be created instead of an error to be thrown. What am I doing wrong?
I have tried HTTP instead of HTTPS but the result is the same error.
© Stack Overflow or respective owner