我目前正在研究将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(图像)无法显示的错误。
以下已经尝试过但无济于事:
如果这有所不同,EpiServer本身就在专用VM(IaaS)上运行,并使用Azure SQL作为数据库。
欢迎任何关于可能(或我在做什么)错误的建议。
谢谢。
谢谢你提出的答案特德,但解决方案更直接。我在官方的EPiServer论坛上发了一个类似的问题:
只需在连接字符串中添加后缀即可:
;EndpointSuffix=core.windows.net
但是,我确实在研究过程中读到了你所回答的类似建议,所以我认为这对用户有好处。谷歌搜索类似的问题,你的答案可能会被投票。
404是因为您在不迁移实际blob的情况下更改了blob提供程序。因此,当请求现有blob(在Episerver数据库中引用)时,将不再找到它。
您可能还对这里提到的blob转换器包感兴趣:How to move blobs from App_Data folder of episerver cms site to azure blob storage hosted in azure cloud