<p>This is a self-explanatory question:</p>

<p>Why does this thing bubble into my try catch's even when nothing is wrong? </p>

<p>Why is it showing up in my log, hundreds of times?</p>

<p><strong>I know its a newb question, but if this site is gonna get search ranking and draw in newbs we have to ask them</strong></p>

[{'answer_id': 12484, 'author': 'Eric Z Beard', 'author_id': 1219, 'author_profile': 'https://Stackoverflow.com/users/1219', 'pm_score': 5, 'selected': True, 'text': '<p>This is probably coming from a Response.Redirect call.  Check this link for an explanation:</p>\n\n<p><a href="http://dotnet.org.za/armand/archive/2004/11/16/7088.aspx" rel="noreferrer">http://dotnet.org.za/armand/archive/2004/11/16/7088.aspx</a></p>\n\n<p>(In most cases, calling Response.Redirect(url, false) fixes the problem)</p>\n'}, {'answer_id': 12487, 'author': 'rjzii', 'author_id': 1185, 'author_profile': 'https://Stackoverflow.com/users/1185', 'pm_score': 3, 'selected': False, 'text': '<p>The most common reason for a ThreadAbortException is calling <a href="http://support.microsoft.com/kb/312629" rel="nofollow noreferrer">Response.End, Response.Redirect, or Server.Transfer</a>. Microsoft has published some suggested functions that should be used in stead of those functions.</p>\n'}, {'answer_id': 264015, 'author': 'Jon Sagara', 'author_id': 731, 'author_profile': 'https://Stackoverflow.com/users/731', 'pm_score': 1, 'selected': False, 'text': '<p>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:</p>\n\n<p><a href="http://www.sagara.net/2008/04/05/response-redirect-and-the-threadabortexception-and-why-its-a-good-thing/" rel="nofollow noreferrer">Response.Redirect and the ThreadAbortException</a></p>\n'}, {'answer_id': 18507130, 'author': 'Luke Puplett', 'author_id': 107783, 'author_profile': 'https://Stackoverflow.com/users/107783', 'pm_score': 0, 'selected': False, 'text': '<p>Knowing that there are (at least) three APIs that internally use <code>Thread.Abort</code>, I\'d like to answer in more practical terms, how to work out what to do about it.</p>\n\n<p>For us, this error started being logged all-of-a-sudden. What changed? We fixed a bug in some database procedure that was dealing with sitemaps.</p>\n\n<p>The log4net logs showed the X-Forwarded-For header (we\'re behind an NLB) was Googlebot\'s IP address, 66.249.78.x which bolstered my theory about the sitemap change leading to Google crawling our site more aggressively looking for images.</p>\n\n<p>The first thing was to find out why only the Googlebot was able to cause this problem. No other client was triggering whatever code path uses <code>Response.Redirect</code>, or whatever.</p>\n\n<p>So in the <code>HttpApplication.Error</code> handler, I added some code to log extra detailed output with all headers, and most data in the <code>HttpResponse</code> and <code>HttpContext</code> spewed to log.</p>\n\n<p>This let me see that the problem was that Googlebot is using an iPhone user agent string and armed with that, I was able to search the codebase for "iPhone" and come up with:</p>\n\n<pre><code>private void CheckIPhoneAccess() { ... }\n</code></pre>\n\n<p>And that uses a Redirect.</p>\n\n<p>What to do about it?</p>\n\n<p>Well, for this aged codebase, it\'s not worth retro-patching all the <code>Response.Redirect</code> calls, so I\'m going to lower the logging level for <code>ThreadAbortException</code> for the application.</p>\n\n<p>I will change the behaviour for Googlebot\'s mobile crawler, that would <em>not</em> lead to \'lies\' about what our site serves to mobiles since it only redirects on the first hit, subsequently it reads a cookie and shows the image. Googlebot does not seem to cache that cookie.</p>\n\n<p>It\'s not perfect, but the site is due to be rebuilt. probably by another team using Scala or something, so in practical terms, I think this is a good choice. I\'ll add comments and may revisit the issue later, build a <code>Response.SafeRedirect</code> extension that encapsulates this advice:</p>\n\n<p><a href="https://stackoverflow.com/questions/2777105/why-response-redirect-causes-system-threading-threadabortexception">Why Response.Redirect causes System.Threading.ThreadAbortException?</a></p>\n\n<p>Luke</p>\n'}, {'answer_id': 18507699, 'author': 'ValidfroM', 'author_id': 407183, 'author_profile': 'https://Stackoverflow.com/users/407183', 'pm_score': 0, 'selected': False, 'text': '<p>The reason of why Response.Redirect will give this exception is asp.net internally implement this API with Thread.Abort(). When this method is called, a special ThreadAbortException is thrown.This exception wont be swallowed by any catch block. It will be re thrown at the end of each catch block. </p>\n'}]
['https://Stackoverflow.com/questions/12476', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/1220/']