在我的 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 ---
Run Code Online (Sandbox Code Playgroud)
编辑这是我看到的另一种:
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 ---
Run Code Online (Sandbox Code Playgroud)
这是我在事件日志中看到的内容,但它在时间或计数上并不完全相关。
A fatal alert was generated and sent to the remote …Run Code Online (Sandbox Code Playgroud)