views:

1695

answers:

6

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

+1  A: 

What does the stacktrace show?
Is there a pattern to it, or does it show up randomly?

Lars Mæhlum
+15  A: 

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)

Eric Z Beard
+3  A: 

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

[1] PRB: ThreadAbortException Occurs If You Use Response.End, Response.Redirect, or Server.Transfer - http://support.microsoft.com/kb/312629

Rob
A: 

Has anyone else been able to resolve a situation like the original poster? I'm seeing the ThreadAbortException still being thrown, even when I set the Redirect or Transfer second parameter to false.

I've been trying various ways of using Server.Transfer, Response.Redirect and Server.Execute without success. It seems that regardless of how I try to achieve the transfer, I'm still getting the exception being thrown.

Peter Bernier
This should be a new question, or a comment on the question.
Jeremy Stein
+1  A: 

I have an entire article on this with what I think is a very good explanation and solution. Take a look. http://www.c6software.com/Articles/ThreadAbortException.aspx

+1  A: 

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

Jon Sagara