Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

A first chance exception of type 'System.Threading.ThreadAbortException'

Posted on 2010-11-21
7
Medium Priority
?
3,414 Views
Last Modified: 2013-12-17
Am building a .net web application on my local machine and when I insert a breakpoint so I can test something I see all the messages (below) in the immediate window.
Everything is working fine with the app so I'm not sure what they can mean. There are no other messages in other windows to give me any other clues.
What is it trying to tell me?

asp.net 4.0
c#
visual studio 2010
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
A first chance exception of type 'System.NullReferenceException' occurred in App_Code.aidrup4p.dll
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
Step into: Stepping over non-user code 'System.Xml.XmlNode.ChildNodes.get'
Step into: Stepping over non-user code 'System.Xml.XmlNode.ChildNodes.get'
Step into: Stepping over non-user code 'System.Xml.XmlNode.ChildNodes.get'
Step into: Stepping over non-user code 'System.Xml.XmlNode.ChildNodes.get'
Step into: Stepping over non-user code 'System.Xml.XmlNode.ChildNodes.get'
Step into: Stepping over non-user code 'string.Split'
Step into: Stepping over non-user code 'string.Concat'
Step into: Stepping over non-user code 'string.Concat'
Step into: Stepping over non-user code 'System.Xml.XmlNode.ChildNodes.get'
A first chance exception of type 'System.NullReferenceException' occurred in App_Code.aidrup4p.dll
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
Step into: Stepping over non-user code 'System.Xml.XmlNode.ChildNodes.get'
Step into: Stepping over non-user code 'System.Xml.XmlNode.ChildNodes.get'
Step into: Stepping over non-user code 'System.Xml.XmlNode.ChildNodes.get'
Step into: Stepping over non-user code 'System.Xml.XmlNode.ChildNodes.get'
Step into: Stepping over non-user code 'System.Xml.XmlNode.ChildNodes.get'
Step into: Stepping over non-user code 'string.Split'
Step into: Stepping over non-user code 'string.Concat'
Step into: Stepping over non-user code 'string.Concat'
Step into: Stepping over non-user code 'System.Xml.XmlNode.ChildNodes.get'
Step into: Stepping over non-user code 'System.Xml.XmlNode.ChildNodes.get'
Step into: Stepping over non-user code 'System.Xml.XmlNode.ChildNodes.get'
A first chance exception of type 'System.NullReferenceException' occurred in App_Code.oexwrzuj.dll
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
Step into: Stepping over non-user code 'System.Xml.XmlNode.ChildNodes.get'
Step into: Stepping over non-user code 'System.Xml.XmlNode.ChildNodes.get'
Step into: Stepping over non-user code 'System.Xml.XmlNode.ChildNodes.get'
Step into: Stepping over non-user code 'string.Split'
Step into: Stepping over non-user code 'string.Concat'
Step into: Stepping over non-user code 'System.Xml.XmlNode.ChildNodes.get'
Step into: Stepping over non-user code 'string.Concat'
Step into: Stepping over non-user code 'System.Text.StringBuilder.Append'
Step into: Stepping over non-user code 'System.Text.StringBuilder.Append'
Step into: Stepping over non-user code 'System.Text.StringBuilder.Append'
Step into: Stepping over non-user code 'System.Text.StringBuilder.Append'
Step into: Stepping over non-user code 'System.Text.StringBuilder.Append'
Step into: Stepping over non-user code 'System.Text.StringBuilder.Append'
Step into: Stepping over non-user code 'System.Text.StringBuilder.Append'
Step into: Stepping over non-user code 'string.Split'
Step into: Stepping over non-user code 'System.Web.UI.Control.OnLoad'
Step into: Stepping over non-user code 'System.Web.UI.Control.LoadRecursive'
Step into: Stepping over non-user code 'System.Web.UI.Page.ProcessRequestMain'
Step into: Stepping over non-user code 'System.Web.UI.Page.ProcessRequest'
Step into: Stepping over non-user code 'System.Web.UI.Page.ProcessRequest'
Step into: Stepping over non-user code 'System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute'
Step into: Stepping over non-user code 'System.Web.HttpApplication.ExecuteStep'
Step into: Stepping over non-user code 'System.Web.HttpApplication.ApplicationStepManager.ResumeSteps'
Step into: Stepping over non-user code 'System.Web.HttpApplication.System.Web.IHttpAsyncHandler.BeginProcessRequest'
Step into: Stepping over non-user code 'System.Web.HttpRuntime.ProcessRequestInternal'
Step into: Stepping over non-user code 'Microsoft.VisualStudio.WebHost.Request.Process'
Step into: Stepping over non-user code 'Microsoft.VisualStudio.WebHost.Host.ProcessRequest'
Step into: Stepping over non-user code 'System.Threading.ThreadPoolWorkQueue.Dispatch'
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
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
A first chance exception of type 'System.NullReferenceException' occurred in App_Code.nvmhhtli.dll
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
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

Open in new window

0
Comment
Question by:QPR
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
7 Comments
 
LVL 75

Expert Comment

by:käµfm³d 👽
ID: 34184593
First chance exceptions are handled by the runtime. They will not cause your application not to function.
0
 
LVL 29

Author Comment

by:QPR
ID: 34184783
so what is it taking exception to?
0
 
LVL 18

Assisted Solution

by:Richard Lee
Richard Lee earned 600 total points
ID: 34187156
To investigate further into these exceptions you should break when exceptions are thrown.

http://msdn.microsoft.com/en-us/library/d14azbfh.aspx

Debug --> Exceptions in Visual Studio

Plus if this feature still work (!?) you should enable .NET Framework Source Stepping

http://msdn.microsoft.com/en-us/library/cc667410.aspx

DaTribe
0
What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

 
LVL 10

Accepted Solution

by:
thefritterfatboy earned 1400 total points
ID: 34189595
Response.Redirect will throw this exception. It is quite a special exception because, despite the fact you caught it, it will be re-processed and thrown again outside your Try Catch to ensure the current thread ends.

You could, if you wanted to enter a world of pain call Reponse.Redirect("Your URL", False) to continue execution - this would not throw the Exception but would continue processing the code on your page (not a good side product unless you really want this to happen!)

The other option is to ignore this particular exception in your try-catches.

Just make the first catch in your catch block an exception type of "System.Threading.ThreadAbortException" and do nothing in that code block.
0
 
LVL 29

Author Comment

by:QPR
ID: 34202252
I have a couple of response.redirects that are set up to take a user back to a particular page should there be some missing querystring data... but I'm not testing that part of the app when I'm seeing this. Or will these exceptions be thrown even if that portion of the code is not running (arrived at)?
0
 
LVL 29

Author Comment

by:QPR
ID: 34202287
actual I'm wrong I am using a response.redirect on button click and each time I use it I get another exception so it looks as though you've nailed that one...
"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"

Not sure how to recreate this one though
"A first chance exception of type 'System.NullReferenceException' occurred in App_Code.aidrup4p.dll"

I went to debug->exceptions and ticked everything, but other than write to the intermediate window nothing other seems to be happening in debug mode.
Should it not break and highlight the offending line?

Should I care about these exceptions?
0
 
LVL 10

Expert Comment

by:thefritterfatboy
ID: 34203376
>>Should it not break and highlight the offending line?<<

Not at all, this is the purpose of a "First Chance" exception.

Have a read over this blog for more info;

http://blogs.msdn.com/b/davidklinems/archive/2005/07/12/438061.aspx

It's likely an external piece of code is catching the NullReferenceException and handling it gracefully.
0

Featured Post

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This document covers how to connect to SQL Server and browse its contents.  It is meant for those new to Visual Studio and/or working with Microsoft SQL Server.  It is not a guide to building SQL Server database connections in your code.  This is mo…
IntroductionWhile developing web applications, a single page might contain many regions and each region might contain many number of controls with the capability to perform  postback. Many times you might need to perform some action on an ASP.NET po…
Video by: ITPro.TV
In this episode Don builds upon the troubleshooting techniques by demonstrating how to properly monitor a vSphere deployment to detect problems before they occur. He begins the show using tools found within the vSphere suite as ends the show demonst…
This is my first video review of Microsoft Bookings, I will be doing a part two with a bit more information, but wanted to get this out to you folks.

705 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question