Windows 10 Windows 10 ThreadAbortException on Response.End和Response.Redirect

Windows 10 Windows 10 ThreadAbortException on Response.End和Response.Redirect,windows-10,threadabortexception,Windows 10,Threadabortexception,将我的开发计算机升级到Windows 10后,我的ASP.NET应用程序已开始在任何时候发出ThreadAbortException响应。调用End或Response.Redirect 我从研究中了解到,这是预期的,您可以调用其他不会引起错误的函数。不过,在升级到Windows 10之前,我从未处理过这个错误。以前我用.NET4.52运行Windows8.1,而Windows10现在是.NET4.6,所以我认为这与此有关。所以问题是为什么它刚刚开始抛出异常,有没有一种方法可以让它停止而不转换我的

将我的开发计算机升级到Windows 10后,我的ASP.NET应用程序已开始在任何时候发出ThreadAbortException响应。调用End或Response.Redirect

我从研究中了解到,这是预期的,您可以调用其他不会引起错误的函数。不过,在升级到Windows 10之前,我从未处理过这个错误。以前我用.NET4.52运行Windows8.1,而Windows10现在是.NET4.6,所以我认为这与此有关。所以问题是为什么它刚刚开始抛出异常,有没有一种方法可以让它停止而不转换我的代码

Thread was being aborted.

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. 

Exception Details: System.Threading.ThreadAbortException: Thread was being aborted.

Source Error: 

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace: 


[ThreadAbortException: Thread was being aborted.]
   System.Runtime.InteropServices.GCHandle.InternalFree(IntPtr handle) +0
   System.Runtime.InteropServices.GCHandle.Free() +77
   System.Web.Util.GCUtil.UnrootObject(IntPtr pointer) +65
   System.Web.ApplicationStepManager.ResumeSteps(Exception error) +687
   System.Web.HttpApplication.System.Web.IHttpAsyncHandler.BeginProcessRequest(HttpContext context, AsyncCallback cb, Object extraData) +247
   System.Web.HttpRuntime.ProcessRequestInternal(HttpWorkerRequest wr) +647

Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.6.79.0

Microsoft已在.NET Framework 4.6中确认此错误: 有些事情你可以试试:

  • 从注册表中删除UseLegacyJIT值
  • 卸载Windows update 3083186

他们发布了除Windows 10之外的所有平台的修补程序。我可以通过添加注册表值HKEY\U LOCAL\U MACHINE\SOFTWARE\Microsoft\来解决这个问题。NETFramework添加一个值为1的useLegacyJit DWORD。