azure - 将 EPiserver 媒体 blob 迁移到 Azure 存储帐户

标签 azure azure-storage azure-blob-storage episerver

我目前正在研究将 EPiServer 11.10.1 媒体 blob 从 Windows DFS 共享迁移到 Azure 存储帐户。

尝试的配置如下:

web.config(注意:仅显示相关部分)

<dependentAssembly>
<assemblyIdentity name="EPiServer.Azure" publicKeyToken="8fe83dea738b45b7" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-9.4.4.0" newVersion="9.4.4.0" />
</dependentAssembly>

<episerver.framework updateDatabaseSchema="false">
<clientResources debug="false" />
<appData basePath="" />
<scanAssembly forceBinFolderScan="true" />

<blob defaultProvider="azureblobs">
<providers>
<add name="azureblobs" type="EPiServer.Azure.Blobs.AzureBlobProvider,EPiServer.Azure" connectionStringName="EPiServerAzureBlobs" container="mycontainer"/>
</providers>
</blob>

connectionStrings.config(注意:仅显示相关部分)

<connectionStrings>
<clear />
<add name="EPiServerAzureBlobs" connectionString="DefaultEndpointsProtocol=https;AccountName=storage00001;AccountKey=NuJBkcpuCbPKH+lcw65OwELkJ1nptJ7CY2Hn4MqNwqwL4WY4C3caSSSJYgH91J6MH9qZPPOOSbAzFZrNk8eIHt6PA==" />
</connectionStrings>

启动站点时,日志中显示以下错误:

(注:仅显示相关部分)

2019-02-19 13:12:41,875 [94] [94a2e50f-06c6-4ddc-a6f7-2d1c43b0735d] ERROR 
EPiServer.Global: Unhandled exception in ASP.NET
Microsoft.WindowsAzure.Storage.StorageException: The remote server returned 
an error: (404) Not Found. ---> System.Net.WebException: The remote server 
returned an error: (404) Not Found.
at System.Net.HttpWebRequest.GetResponse()
Request Information
RequestID:5e731c27-d01e-00cc-4254
RequestDate:Tue, 19 Feb 2019 13:12:41 GMT
StatusMessage:The specified blob does not exist.

我看不到会导致媒体 blob(图像)不显示的错误。

已经尝试过以下方法,但没有效果:

  • 权限:Azure 存储帐户 - Blob - 包含(容器和 Blob 的匿名读取访问权限)
  • 权限:媒体 blob(图像)可在独立于 EpiServer 平台的浏览器中访问
  • Microsoft 支持已确认不存在影响存储帐户的已知问题

如果这有什么不同的话,EpiServer 本身正在专用 VM (IaaS) 上运行,并使用 Azure SQL 作为数据库。

  • appData basePath=""是否需要包含一个值才能与 Azure 存储帐户配合使用?

欢迎对可能存在的问题(或我正在做的事情)提出任何建议。

谢谢。

最佳答案

感谢您提出的答案 Ted,但解决方案更简单。我在 EPiServer 官方论坛上发布了类似的问题:

https://world.episerver.com/forum/developer-forum/-Episerver-75-CMS/Thread-Container/2019/2/migrating-to-azure-storage-accounts-media-blob---image---not-displayed-in-browser/

只需将后缀添加到连接字符串即可:

;EndpointSuffix=core.windows.net

但是,我确实在研究时读到了与您的回答类似的建议,因此我认为这对用户在谷歌上搜索类似的问题以使您的答案得到支持将是有益的。

关于azure - 将 EPiserver 媒体 blob 迁移到 Azure 存储帐户,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/54767851/

相关文章:

azure - 有关热、冷和存档 Azure 存储的统计信息

Azure block blob存储连续上传相同文件失败

azure - 从 Append Blob 复制到 BlockBlob

c# - 如何从 asp.net web api 删除 Azure blob?

node.js - Azure 存储表查询 - 结果与响应

azure - 限制azure blob上传速度的方法

wpf - Azure StorageClient 瞬时连接测试 - 挂起

c# - Microsoft Bot Framework - Facebook 集成 - Net Framework

azure - Azure 部署的应用程序的 SendGrid 入站解析失败

Azure WebJob 不接受有效的(?)CRON 表达式