Orchard CMS“Microsoft Azure 媒体存储”模块无法连接到新的存储帐户
Posted
技术标签:
【中文标题】Orchard CMS“Microsoft Azure 媒体存储”模块无法连接到新的存储帐户【英文标题】:Orchard CMS "Microsoft Azure Media Storage" module unable to connect to new storage account 【发布时间】:2021-01-21 16:02:31 【问题描述】:我想将我的 Orchard CMS v.1.10.1.0 应用程序连接到 Azure blob 存储帐户。我多年来一直遵循相同的过程,following this documentation。这个过程已经停止为我工作。我的应用程序不会连接到新的 Azure 存储帐户——无论是 StorageV1、StorageV2 还是 Blob Storage。
我可以连接到过去在 Orchard 中使用过的存储帐户,但我无法连接到新的存储帐户。
An unhandled exception has occurred and the request was terminated. Please refresh the page. If the error persists, go back
The remote server returned an error: (400) Bad Request.
Microsoft.WindowsAzure.Storage.StorageException: The remote server returned an error: (400) Bad Request. ---> System.Net.WebException: 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) --- End of inner exception stack trace --- at Microsoft.WindowsAzure.Storage.Core.Executor.Executor.ExecuteSync[T](RESTCommand`1 cmd, IRetryPolicy policy, OperationContext operationContext) at Microsoft.WindowsAzure.Storage.Blob.CloudBlobContainer.Exists(Boolean primaryOnly, BlobRequestOptions requestOptions, OperationContext operationContext) at Microsoft.WindowsAzure.Storage.Blob.CloudBlobContainer.CreateIfNotExists(BlobContainerPublicAccessType accessType, BlobRequestOptions requestOptions, OperationContext operationContext) at Orchard.Azure.Services.FileSystems.AzureFileSystem.EnsureInitialized() at Orchard.Azure.Services.FileSystems.AzureFileSystem.ListFolders(String path) at Orchard.MediaLibrary.Services.MediaLibraryService.GetMediaFolders(String relativePath) at Orchard.MediaLibrary.Controllers.AdminController.Index(String folderPath, Boolean dialog) at lambda_method(Closure , ControllerBase , Object[] ) at System.Web.Mvc.ActionMethodDispatcher.Execute(ControllerBase controller, Object[] parameters) at System.Web.Mvc.ReflectedActionDescriptor.Execute(ControllerContext controllerContext, IDictionary`2 parameters) at System.Web.Mvc.ControllerActionInvoker.InvokeActionMethod(ControllerContext controllerContext, ActionDescriptor actionDescriptor, IDictionary`2 parameters) at System.Web.Mvc.Async.AsyncControllerActionInvoker.<BeginInvokeSynchronousActionMethod>b__39(IAsyncResult asyncResult, ActionInvocation innerInvokeState) at System.Web.Mvc.Async.AsyncResultWrapper.WrappedAsyncResult`2.CallEndDelegate(IAsyncResult asyncResult) at System.Web.Mvc.Async.AsyncResultWrapper.WrappedAsyncResultBase`1.End() at System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeActionMethod(IAsyncResult asyncResult) at System.Web.Mvc.Async.AsyncControllerActionInvoker.AsyncInvocationWithFilters.<InvokeActionMethodFilterAsynchronouslyRecursive>b__3d() at System.Web.Mvc.Async.AsyncControllerActionInvoker.AsyncInvocationWithFilters.<>c__DisplayClass46.<InvokeActionMethodFilterAsynchronouslyRecursive>b__3f() at System.Web.Mvc.Async.AsyncControllerActionInvoker.AsyncInvocationWithFilters.<>c__DisplayClass46.<InvokeActionMethodFilterAsynchronouslyRecursive>b__3f() at System.Web.Mvc.Async.AsyncControllerActionInvoker.AsyncInvocationWithFilters.<>c__DisplayClass46.<InvokeActionMethodFilterAsynchronouslyRecursive>b__3f() Request Information RequestID:edaa1946-501e-0035-0d03-9c41ef000000 RequestDate:Tue, 06 Oct 2020 17:10:00 GMT StatusMessage:The TLS version of the connection is not permitted on this storage account.
【问题讨论】:
【参考方案1】:我通过将此行放在对存储帐户的调用之前解决了这个问题。
ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12;
【讨论】:
【参考方案2】:我能够通过进入新存储帐户的配置设置并要求较低的最低 TLS 版本来解决此问题。
【讨论】:
以上是关于Orchard CMS“Microsoft Azure 媒体存储”模块无法连接到新的存储帐户的主要内容,如果未能解决你的问题,请参考以下文章
ASP.Net CMS 推荐、Orchard、Sitefinity、Umbraco 还是 N2? [关闭]