将 EPiserver 媒体 Blob 迁移到 Azure 存储帐户

3

我目前正在研究将EPiServer 11.10.1媒体块从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 存储帐户一起工作?欢迎提出任何关于可能出现什么问题(或我在做什么)的建议。谢谢。
2个回答

2
感谢您提供的答案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

然而,我在研究时也读到了类似于你回答的建议,所以我认为让你的回答得到赞同将对搜索类似问题的用户有益。

最初的回答:


0

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接