我正在尝试使用Azure模拟器来创建容器,但我认为不起作用:
模拟器端点:
BlobEndpoint: http://127.0.0.1:10000/
App.config:
<appSettings>
<add key="StorageConnectionString" value="UseDevelopmentStorage=true;" />
</appSettings>
代码:
CloudStorageAccount storageAccount =
CloudStorageAccount.Parse(CloudConfigurationManager.GetSetting("StorageConnectionString"));
CloudBlobClient blobClient = storageAccount.CreateCloudBlobClient();
CloudBlobContainer container = blobClient.GetContainerReference("mycontainer");
await container.CreateIfNotExistsAsync();
但是当我尝试访问http://127.0.0.1:10000/mycontainer
时,我得到了:
The requested URI does not represent any resource on the server.
答案 0 :(得分:2)
正确的容器URI应为http://127.0.0.1:10000/devstoreaccount1/mycontainer,您是如何尝试访问它的?我不认为直接在浏览器中打开它是可行的。