以下代碼在「CreateIfNotExist」方法調用中引發錯誤。我試圖連接到我的Azure的Blob存儲,並創建一個名爲新集裝箱「圖像」無法在Azure Blob存儲上創建Blob容器
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();
的錯誤是:
[StorageClientException: The requested URI does not represent any resource on the server.]
「影像」容器不存在,但我期待它被創建而不是被拋出的錯誤。我究竟做錯了什麼?
我試過HTTP而不是HTTPS,但結果是相同的錯誤。