This is a self-explanatory question:
Why does this thing bubble into my try catch's even when nothing is wrong?
Why is it showing up in my log, hundreds of times?
I know its a newb question, but if this site is gonna get search ranking and draw in newbs we have to ask them
When a call is made to the Abort method to destroy a thread, the common language runtime throws a ThreadAbortException on . NET Framework. ThreadAbortException is a special exception that can be caught, but it will automatically be raised again at the end of the catch block.
Abort() Raises a ThreadAbortException in the thread on which it is invoked, to begin the process of terminating the thread. Calling this method usually terminates the thread.
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)
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.
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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With