在我的MVC应用程序中,有时会出现以下异常:
System.Net.WebException: The request was aborted: The request was canceled.
at System.Net.HttpWebRequest.BeginGetRequestStream(AsyncCallback callback, Object state)
at System.Net.Http.HttpClientHandler.StartGettingRequestStream(RequestState state)
at System.Net.Http.HttpClientHandler.<>c__DisplayClass4.<PrepareAndStartContentUpload>b__0(Task task)
at System.Threading.Tasks.Task.Execute()
--- End of inner exception stack trace ---
编辑 我看到另一种类型:
System.Exception: Unhandled Task Error ---> System.NullReferenceException: Object reference not set to an instance of an object.
at System.Web.HttpApplication.PipelineStepManager.ResumeSteps(Exception error)
at System.Web.HttpApplication.ResumeStepsFromThreadPoolThread(Exception error)
at System.Web.HttpApplication.CallHandlerExecutionStep.OnAsyncHandlerCompletion(IAsyncResult ar)
at System.Threading.Tasks.Task.Execute()
--- End of inner exception stack trace ---
这是我在事件日志中看到的内容,但它并不完全与时间或数量相关。
A fatal alert was generated and sent to the remote endpoint. This may result in termination of the connection. The TLS protocol defined fatal error code is 40. The Windows SChannel error state is 1205.
An TLS 1.2 connection request was received from a remote client application, but none of the cipher suites supported by the client application are supported by the server. The SSL connection request has failed.
有没有办法识别异常的来源/位置或获取关于异常来自何处的其他信息?
编辑2 这是另一个我看到的。它们都与OnAsyncHandlerCompletion相关,但我不确定来源是什么。
System.Exception: Unhandled Task Error ---> System.NullReferenceException: Object reference not set to an instance of an object.
at System.Web.HttpApplication.get_CurrentModuleContainer()
at System.Web.HttpApplication.PipelineStepManager.ResumeSteps(Exception error)
at System.Web.HttpApplication.ResumeStepsFromThreadPoolThread(Exception error)
at System.Web.HttpApplication.CallHandlerExecutionStep.OnAsyncHandlerCompletion(IAsyncResult ar)
at System.Threading.Tasks.Task.Execute()
--- End of inner exception stack trace ---
/EDIT 2