First Chance Exceptions

Last post 06-29-2005 9:50 AM by Geminiman. 1 replies.

Sort Posts:

  • First Chance Exceptions

    06-28-2005, 11:02 AM
    • Member
      320 point Member
    • Geminiman
    • Member since 11-12-2003, 7:22 AM
    • Posts 86
    In my immediate window in debug mode I see these all of the time on one specific page:

    A first chance exception of type 'System.Threading.ThreadAbortException' occurred in mscorlib.dll
    An exception of type 'System.Threading.ThreadAbortException' occurred in mscorlib.dll but was not handled in user code

    I don't know what's causing it though, and even when I go into Debug/Exceptions and check them all off, I never hit the errors in code even though it keeps spewing them out.

    I also see these every time I do a Response.Redirect.

    I need to get rid of these errors because it kills the speed of the page loading. Any ideas?

    Thanks!

  • Re: First Chance Exceptions

    06-29-2005, 9:50 AM
    • Member
      320 point Member
    • Geminiman
    • Member since 11-12-2003, 7:22 AM
    • Posts 86
    Solved my own problems (sort of)

    Basically if you do a Response.Redirect(url, true) you'll always get an threadabort exception from what I can tell.  (the thread gets aborted the moment the response is closed so anything past that line, even a return; will get killed.

    What was happening was that there was an image display ashx on the page that was accidently closing the response.  As soon as I took out the close, the threadaborts went away.

Page 1 of 1 (2 items)