简体   繁体   English

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

[英]Migrating EPiserver media blobs to Azure Storage Account

I am currently researching into migrating the EPiServer 11.10.1 media blobs from a Windows DFS Share to an Azure Storage Account. 我目前正在研究将EPiServer 11.10.1媒体blob从Windows DFS共享迁移到Azure存储帐户。

The configuration tried is as follows: 尝试的配置如下:

web.config (Note: only relevant sections are shown) 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 (Note: only relevant sections are shown) connectionStrings.config(注意:仅显示相关部分)

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

When starting the site, the following error is shown in the logs: 启动站点时,日志中会显示以下错误:

(Note: only relevant sections are shown) (注意:仅显示相关部分)

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.

I am unable to see an error which would be causing the media blob (image) not to be displayed. 我无法看到导致媒体blob(图像)无法显示的错误。

The following has been tried already but to no avail: 以下已经尝试过但无济于事:

  • Permissions: Azure Storage Account - Blobs - Contain (anonymous read access for containers and blobs) 权限:Azure存储帐户 - Blob - 包含(容器和blob的匿名读取访问权限)
  • Permissions: The media blob (images) are accessible in a browser independent of the EpiServer platform 权限:可以在独立于EpiServer平台的浏览器中访问媒体blob(图像)
  • Microsoft Support has confirmed there are no known issues affecting the Storage Account Microsoft支持部门已确认没有影响存储帐户的已知问题

If this makes a difference, EpiServer itself is running on a dedicated VM (IaaS) and using Azure SQL for databases. 如果这有所不同,EpiServer本身就在专用VM(IaaS)上运行,并使用Azure SQL作为数据库。

  • Does appData basePath="" need to contain a value to work with an Azure Storage Account? appData basePath =“”是否需要包含一个值以使用Azure存储帐户?

Any suggestions on what might be (or what I am doing) wrong are welcome. 欢迎任何关于可能(或我在做什么)错误的建议。

Thank you. 谢谢。

Thank you for your proposed answer Ted but the solution was more straightforward. 谢谢你提出的答案特德,但解决方案更直接。 I posted a similar question to the official EPiServer forums: 我在官方的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/ https://world.episerver.com/forum/developer-forum/-Episerver-75-CMS/Thread-Container/2019/2/migrating-to-azure-storage-accounts-media-blob---image-- -未显示的功能于浏览器/

It was simply a matter of adding the suffix to the connection string: 只需在连接字符串中添加后缀即可:

;EndpointSuffix=core.windows.net

However, I did read similar suggestions to what you answered whilst researching, so I think it will be of benefit to users Googling a similar problem for your answer to be upvoted. 但是,我确实在研究过程中读到了你所回答的类似建议,所以我认为这对用户有好处。谷歌搜索类似的问题,你的答案可能会被投票。

The 404 is because you've changed the blob provider without migrating the actual blobs. 404是因为您在不迁移实际blob的情况下更改了blob提供程序。 Thus, when an existing blob (referenced in the Episerver database) is requested, it is no longer found. 因此,当请求现有blob(在Episerver数据库中引用)时,将不再找到它。

You may also be interested in the blob converter package mentioned here: How to move blobs from App_Data folder of episerver cms site to azure blob storage hosted in azure cloud 您可能还对此处提到的blob转换器包感兴趣: 如何将blob从episerver cms站点的App_Data文件夹移动到azure cloud中托管的azure blob存储

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM