|
| Debugging a first chance exception in MSCORLIB.DLL |
 |
Thu, 3 Apr 2008 01:07:33 +0000 |
Hi, I have a fully working application, but I noticed that I get different
exceptions while running in debug in the output window:
A first chance exception of type 'System.Threading.ThreadAbortException'
occurred in mscorlib.dll
I am using visual studio 2005.
Now the application still runs after these exceptions are thrown, and I read in
many places online that I could go to the exceptions window, then check the box
to break on my exception right? Which I did, but this doesn't stop the
exceptions in mscorlib.dll. I am wondering how exactly I can configure the
debugger to stop on first chance exceptions AND can stop in mscorlib.dll so I
can get a stack trace and figure out whats going on. Thank you.
-Nate
|
| Post Reply
|
| Re: Debugging a first chance exception in MSCORLIB.DLL |
 |
Thu, 3 Apr 2008 03:12:25 +0000 |
Thread Abort exceptions may be normal in an ASP.NET Application. If anywhere in
your code you use Response.Redirect("url"); or
Response.Redirect("url", false); it will cause a thread abort. This is
because the first overload or the second overload with false calls
Response.End(); which in turn calls a Thread.Abort();
This may be what you are seeing.
|
| Post Reply
|
| Re: Debugging a first chance exception in MSCORLIB.DLL |
 |
Thu, 3 Apr 2008 21:32:36 +0000 |
Kevin,
Thank you for your response, but I am getting 4 different types of these first
chance exceptions at varying times.
I really need to know how I can get visual studio to break at these
exceptions, when I configure it in the exceptions tab to break, it doesn't
break. Thanks, I am using VS 2005, ASP .NET 2.0.
These are the exceptions:
A first chance exception of type 'System.UnauthorizedAccessException' occurred
in mscorlib.dll
A first chance exception of type 'System.InvalidOperationException' occurred in
System.Web.dll
A first chance exception of type 'System.TypeLoadException' occurred in
mscorlib.dll
A first chance exception of type 'System.Threading.ThreadAbortException'
occurred in mscorlib.dll
|
| Post Reply
|
|
|
|
|
|
|
|
|
|