Wednesday, March 3, 2010

Calling Response.End() throws a ThreadAbortException. Always.

...So don't Try to Catch it.

If you do catch it, don't log the error.

If you log it, don't worry about it.

Here's the background and some workarounds.  I briefly tried using HttpContext.Current.ApplicationInstance.CompleteRequest as suggested, but it does not stop execution on the page the way Response.End() does.

No comments:

Post a Comment