【问题标题】:Image Resizer .net Azure Private Blob AccessImage Resizer .net Azure 私有 Blob 访问
【发布时间】:2016-03-18 17:27:12
【问题描述】:

一直试图解决这个问题,但我有一个包含演示图像的私有 blob,我正试图通过调整大小应用程序访问它。我正在使用 blob 的辅助连接字符串,它似乎一直在抛出 404 错误

这里是要点的链接

https://gist.github.com/dbassassin/d95d4d8f7f21c9d6ee32

感谢任何帮助,我一直认为这只是身份验证的问题,或者我遗漏了一些东西。

我的 Web.config 持有:

  <resizer>
    <plugins>
      <add name="AzureReader2"
      prefix="~/"
      connectionString="DefaultEndpointsProtocol=https;AccountName=storageaccountnamehere;AccountKey=secretstuffhere==;"
      endpoint="https://cvcdbsaz01.blob.core.windows.net/"
      />
    </plugins>
    <diagnostics enableFor="allhosts" />
  </resizer>

【问题讨论】:

标签: azure blob imageresizer


【解决方案1】:

设置 redirectToBlobIfUnmodified="false" - AzureReader2 目前只能代理私有 blob;它无法重定向到它们并生成共享访问签名。

另外,请确认您可以直接从 C# 访问容器中的 blob。您使用的凭据或容器/路径可能不正确。

【讨论】:

  • 仍然不起作用,我可以使用控制台应用程序访问容器并列出内容:/
  • 这里是错误消息,如果它有助于@nathaniel jones [FileNotFoundException: Azure blob file not found] ImageResizer.Plugins.AzureReader2.d__14.MoveNext() +409
  • 能否设置断点并查看传递给 Azure SDK 的参数?您可以克隆 github.com/imazen/resizer 并构建这两个项目作为解决方案的一部分,以便更轻松地进行调试。
猜你喜欢
  • 2018-11-20
  • 1970-01-01
  • 2018-04-15
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2021-09-17
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多