Response.Redirect - ThreadAbortException
The Response.Redirect method is often used in webpages to redirect users to other pages as part of the web application. ASP.NET offers different ways to build redirection into webpages :
- Using hyperlinks on pages.
- Configuring cross-page posting, which enables you to specify an alternate target page when the current page is submitted.
- Redirecting programmatically by forcing the browser to request a different page.
- Redirecting programmatically by transferring control to a different page in the same Web application.
4 Comments:
At 3:53 PM, Anonymous said…
Server.Transfer also generates this exception. Using Reflector I've found that it calls Server.Execute, then Response.End
At 1:38 AM, Anonymous said…
You get the same result (without the threadabort exception with the following)
Response.Redirect("myurl", false);
HttpContext.Current.ApplicationInstance.CompleteRequest();
At 1:53 AM, Anonymous said…
Crap, i was thinking about Response.End (which throws a TAE too)
And after a bit of searching i ended up at: http://support.microsoft.com/default.aspx?scid=kb;EN-US;312629
At 9:18 AM, patrick said…
Nice blog! Thank you for this sharing..... web application
Post a Comment
<< Home