Adding Azure Blob Storage on EPiServer 11.20.14 Site causes 400 Bad Request

Vote:
 

Our client have been running a fileshare as the default blob provider, there's been some issues with getting that to fully work so they've been doing some work around. They wish to move it to Azure Storage. We've set up a storage account and container, all according to the guides.

I managed to copy all the blobs using AzCopy to the container I want to use. But as soon as I introduce this to my web.config, it crashes and gives me a 400 response.

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

<add name="EPiServerAzureBlobs" connectionString="DefaultEndpointsProtocol=https;AccountName=xxxxxxx;AccountKey=xxxxxxx==;EndpointSuffix=core.windows.net"/>

The exception that is thrown is as follows: 

One or more errors occurred.
   at System.Threading.Tasks.Task.WaitAll(Task[] tasks, Int32 millisecondsTimeout, CancellationToken cancellationToken)
   at EPiServer.Framework.FrameworkInitialization.<>c__DisplayClass2_0.<InitializeBlobProviders>b__0(Object o, EventArgs e)

The remote server returned an error: (400) Bad Request.
   at Microsoft.WindowsAzure.Storage.Core.Executor.Executor.ExecuteSync[T](RESTCommand`1 cmd, IRetryPolicy policy, OperationContext operationContext) in c:\Program Files (x86)\Jenkins\workspace\release_dotnet_master\Lib\ClassLibraryCommon\Core\Executor\Executor.cs:line 604
   at EPiServer.Azure.Blobs.DefaultAzureBlobContainer.CreateIfNotExist()
   at System.Threading.Tasks.Task.Execute()

The remote server returned an error: (400) Bad Request.
   at System.Net.HttpWebRequest.GetResponse()
   at Microsoft.WindowsAzure.Storage.Core.Executor.Executor.ExecuteSync[T](RESTCommand`1 cmd, IRetryPolicy policy, OperationContext operationContext) in c:\Program Files (x86)\Jenkins\workspace\release_dotnet_master\Lib\ClassLibraryCommon\Core\Executor\Executor.cs:line 677


We are running on .NET Framework 4.6.1 and EPiServer.CMS 11.20.14 which means some of the newer packages for Azure won't work, so I'm currently using EPiServer.Azure 9.4.4 and WindowsAzure.Storage 8.5.0. I know a split has been made for this package, but installing the seperate ones did not fix the problem. Any clues to what might be causing this? Thank you! 

#308054
Edited, Sep 06, 2023 9:14
Vote:
 

Is there any inner exception showing the response body? Or can you see any errors logged in the diagnostics log of the container in Azure?

#308209
Sep 08, 2023 14:28
Vote:
 

So updating the targeted framwork to 4.6.2 made it possible to update some of the packages, including EPiServer.Azure to 10.0.1. I was also able to dive a bit deeper into the problem and found an inner exception: "WebForms UnobtrusiveValidationMode requires a ScriptResourceMapping for 'jquery'. Please add a ScriptResourceMapping named jquery(case-sensitive)" on page load. So adding this to my webconfig put the site back up:

<add key="ValidationSettings:UnobtrusiveValidationMode" value="None" />

For the blobs to work I made a new copy from my local directory to my container using AzCopy, putting them directly under the container and not inside a sub-directory. After that I ran the BlobConverter-job from the EPiCode.BlobConverter nuget and it's finally running as I wanted.

#308327
Sep 11, 2023 9:53
This topic was created over six months ago and has been resolved. If you have a similar question, please create a new topic and refer to this one.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.