Wednesday 3 September 2008

.NET Exceptions again


Debugging in Visual Studio sometime really gets you bugged with annoying error messages. I have listed here are a few of them:
1. A first chance exception of type 'System.Configuration.ConfigurationErrorsException' occurred in System.Configuration.dll. Additional information: This element is not currently associated with any context
2. A first chance exception of type 'System.InvalidOperationException' occurred in System.dll. Additional information: Instance names used for writing to custom counters must be 127 characters or less. 
3. A first chance exception of type 'System.IO.FileNotFoundException' occurred in mscorlib.dll . Additional information: Could not load file or assembly 'myProjectProxy.XmlSerializers, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specified.
Scenario 1 and 3 is seems to be problem with the implementation of .NET libraries. In their normal processing they throw exception. It catches them and follow alternate execution path. In short developer (debugger :) )Don’t need to worry about it simply ignore them.

For number 2 lots of people has lot of thing to say. None of them so far solved my problem. I will update once I find a solution. As I said again this one also doesn’t stop my application from working. But still i tried to fix it. After googling I found somebody was saying adding following parameter in web/app config will fix the problem. 


<userDeploymentRoot
type=“System.String“>c:\temp</userDeploymentRoot>
<useDefaultDeploymentRoot
type=“System.Boolean“> False</useDefaultDeploymentRoot>


Well this didn't solve the problem yet. As I was saying these stuff are annoying but we gotta live with it.
Happy debugging :)

No comments:

Post a Comment