Azure Storage 403 Forbidden exception a 32-bit issue?

不问归期 提交于 2019-12-22 03:50:37

问题


We've spent quite some time to locate the reason for the following exception:

The remote server returned an error: (403) Forbidden.

Stacktrace:

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 Microsoft.WindowsAzure.Storage.Blob.CloudBlobContainer.Create(BlobContainerPublicAccessType accessType, BlobRequestOptions requestOptions, OperationContext operationContext) 
   in c:\\Program Files (x86)\\Jenkins\\workspace\\release_dotnet_master\\Lib\\ClassLibraryCommon\\Blob\\CloudBlobContainer.cs:line 68
at Microsoft.WindowsAzure.Storage.Blob.CloudBlobContainer.CreateIfNotExists(BlobContainerPublicAccessType accessType, BlobRequestOptions requestOptions, OperationContext operationContext) 
   in c:\\Program Files (x86)\\Jenkins\\workspace\\release_dotnet_master\\Lib\\ClassLibraryCommon\\Blob\\CloudBlobContainer.cs:line 233
at Microsoft.WindowsAzure.Storage.Blob.CloudBlobContainer.CreateIfNotExists(BlobRequestOptions requestOptions, OperationContext operationContext) 
   in c:\\Program Files (x86)\\Jenkins\\workspace\\release_dotnet_master\\Lib\\ClassLibraryCommon\\Blob\\CloudBlobContainer.cs:line 196
...The rest is removed for clearity...

As a last resort we changed the App-service environment setting from 32-bit (seems to be default) to 64-bit and the problem was solved. No more forbidden exceptions.

We still don't know why 32-bit should cause the exception. Does anybody know why? Would be nice to know.

Update

Assemblies in our solution are compiled as .NET 4.6.1/Any CPU

Some of the theories we have

  • Nuget/Azure incompatibilities (versioning)
  • JIT-compiler 32-bit/64-bit differences
  • Timing issues with 32-bit (authentication and server-clock)
  • Other...

来源:https://stackoverflow.com/questions/43777425/azure-storage-403-forbidden-exception-a-32-bit-issue

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!