我已通过 Kudu 在 Azure 上添加了 let's encrypt 扩展。此扩展一直运行良好,直到最近,现在当我尝试将 SSL 证书应用于网站时出现以下错误:
“/letsencrypt”应用程序中的服务器错误。任务已取消。描述:执行当前 Web 请求期间发生未处理的异常。请查看堆栈跟踪以获取有关错误及其在代码中起源的更多信息。
异常详细信息:System.Threading.Tasks.TaskCanceledException:一项任务已被取消。
源错误:
执行当前 Web 请求期间生成了未处理的异常。可以使用下面的异常堆栈跟踪来识别有关异常来源和位置的信息。
堆栈跟踪:
[TaskCanceledException:一项任务已被取消。]
System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) +14339641
System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) +60
LetsEncrypt.Azure.Core.Services.d__5.MoveNext() 在 D:\a\1\s\LetsEncrypt.SiteExtension.Core\Services\BaseHttpAuthorizationChallengeProvider.cs:86 System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() +31
LetsEncrypt.Azure.Core.Services.d__5.MoveNext() 在 D:\a\1\s\LetsEncrypt.SiteExtension.Core\Services\BaseHttpAuthorizationChallengeProvider.cs:131 System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() +31
System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(任务任务) +14339607
System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(任务任务) +60
LetsEncrypt.Azure.Core.Services.d__5.MoveNext() 在 D:\a\1\s\LetsEncrypt.SiteExtension.Core\Services\AcmeService.cs:43
System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() +31
System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(任务任务) +14339607
System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(任务任务) +60
LetsEncrypt.Azure.Core.d__13.MoveNext() 在D:\a\1\s\LetsEncrypt.SiteExtension.Core\CertificateManager.cs:192
System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() +31
System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(任务任务) +14339607
System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(任务任务) +60
LetsEncrypt.Azure.Core.d__14.MoveNext() 在 D:\a\1\s\LetsEncrypt.SiteExtension.Core\CertificateManager.cs:205
System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() +31
System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(任务任务) +14339607
System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(任务任务)+60
LetsEncrypt.SiteExtension.Controllers.d__7.MoveNext()位于 D:\a\1\s\LetsEncrypt-SiteExtension\Controllers\HomeController.cs:229
System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() +31
System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(任务任务)+14339607
System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(任务任务)+60
System.Web.Mvc.Async.TaskAsyncActionDescriptor.EndExecute(IAsyncResult asyncResult)+92
System.Web.Mvc.Async.<>c__DisplayClass37.b__36(IAsyncResult异步结果)+22
System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeActionMethod(IAsyncResult 异步结果)+42
System.Web.Mvc.Async.AsyncInvocationWithFilters.b__3d() +72 System.Web.Mvc.Async.<>c__DisplayClass46.b__3f() +387 System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeActionMethodWithFilters(IAsyncResult asyncResult) +42
System.Web.Mvc.Async.<>c__DisplayClass2b.b__1c() +38 System.Web.Mvc.Async.<>c__DisplayClass21.b__1e(IAsyncResult asyncResult) +188
System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeAction(IAsyncResult asyncResult) +38
System.Web.Mvc.Controller.b__1d(IAsyncResult asyncResult, ExecuteCoreState innerState) +29
System.Web.Mvc.Async.WrappedAsyncVoid 1.CallEndDelegate(IAsyncResult asyncResult) +39 System.Web.Mvc.Controller.EndExecute(IAsyncResult asyncResult) +38 System.Web.Mvc.MvcHandler.b__5(IAsyncResult asyncResult, ProcessRequestState innerState) +43 System.Web.Mvc.Async.WrappedAsyncVoid`1.CallEndDelegate(IAsyncResult asyncResult) +68 System.Web.Mvc.MvcHandler.EndProcessRequest(IAsyncResult asyncResult) +38 System.Web.CallHandlerExecutionStep.InvokeEndHandler(IAsyncResult ar) +212 System.Web.CallHandlerExecutionStep.OnAsyncHandlerCompletion(IAsyncResult ar) +1661.CallEndDelegate(IAsyncResult asyncResult) +68
System.Web.Mvc.Controller.EndExecuteCore(IAsyncResult asyncResult) +52 System.Web.Mvc.Async.WrappedAsyncVoid
为了尝试解决这个问题,我已将扩展升级到最新版本,扩展已更新,但仍然收到上述黄屏错误。
我有 50 个证书需要添加到服务器,我曾尝试批量添加和单独添加,每次我尝试添加证书时,服务器上的所有 250 个网站都会瘫痪。我还对 let's encrypt 的 5 个证书限制非常谨慎,所以我不想继续尝试失败。
答案1
我使用以下链接中的建议解决了这个问题:
https://www.nuttyabouthosting.co.uk/knowledgebase/article/umbraco-and-lets-encrypt
我必须更改网络配置:
<add key="umbracoReservedPaths" value="~/umbraco,~/install/" />
到
<add key="umbracoReservedPaths" value="~/umbraco,~/install/,~/.well-known" />
否则,Umbraco 将无法正确路由请求。