Why is my asp.net application throwing ThreadAbortException?

This is probably coming from a Response.Redirect call. Check this link for an explanation:

http://dotnet.org.za/armand/archive/2004/11/16/7088.aspx

(In most cases, calling Response.Redirect(url, false) fixes the problem)


As others have said, it occurs when you call Response.End() (which occurs when you call Response.Redirect without passing false as the second parameter). This is working as designed; typically, if you call Response.Redirect, you want the redirect to happen immediately. See this for more information:

Response.Redirect and the ThreadAbortException


The most common reason for a ThreadAbortException is calling Response.End, Response.Redirect, or Server.Transfer. Microsoft has published some suggested functions that should be used in stead of those functions.