You receive a
ThreadAbortException exception in a Microsoft ASP.NET Web application that is based on the Microsoft .NET Framework 2.0 when the following conditions are true:
- You set the Async page directive property to true. For example, you use the following line of code.
<%@ Page Language="C#" Async="true"%>
- You call the HttpResponse.Redirect method.
You receive an exception message that resembles the following:
[ThreadAbortException: Thread was being aborted.]
System.Web.HttpContext.InvokeCancellableCallback(WaitCallback callback, Object state) +311
System.Web.UI.PageAsyncInfo.CallHandlers(Boolean onPageThread) +68
[HttpException (0x80004005): Exception of type 'System.Web.HttpException' was thrown.]
System.Web.HttpAsyncResult.End() +3278107
System.Web.UI.Page.AsyncPageEndProcessRequest(IAsyncResult result) +21
ASP.page_001_aspx.EndProcessRequest(IAsyncResult ar) +4
System.Web.CallHandlerExecutionStep.OnAsyncHandlerCompletion(IAsyncResult ar) +57
--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework
Version:2.0.50727.42; ASP.NET Version:2.0.50727.42