【问题标题】:Access container url using Azure Blob Emulator使用 Azure Blob 模拟器访问容器 url
【发布时间】:2017-06-07 09:54:41
【问题描述】:

我正在尝试使用 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.

【问题讨论】:

标签: c# azure-blob-storage azure-emulator


【解决方案1】:

正确的容器 URI 应该是http://127.0.0.1:10000/devstoreaccount1/mycontainer,您是如何尝试访问它的?我认为直接在浏览器中打开是不可行的。

【讨论】:

  • 如果我输入带有文件扩展名的正确 URL,它就可以工作。
猜你喜欢
  • 2013-04-08
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2021-05-02
  • 2018-11-21
  • 2016-12-26
  • 2022-10-20
相关资源
最近更新 更多