Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>I've just wasted an hour or so, after hitting exactly the same problem.</p> <p>I have a WPF app, which was successfully calling a Web Service and getting some data.</p> <p>But... this morning, I went into the Exceptions dialog in VS2008, and asked it to throw an exception on "Common Language Runtime Exceptions".</p> <p>From then on, my app would crash as soon as it hit the line to initialise my webservice variable:</p> <p><strong>MikesWebServiceSoapClient client = new MikesWebServiceSoapClient ();</strong></p> <p><em>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</em></p> <p>I did read the comments in this StackOverflow thread, but was confused. In the Exceptions dialog, I could disable the "System.Configuration" exceptions from being thrown... but this exception WOULD still occur. And I didn't have any other exceptions relating to System.Configuration that I could untick.</p> <p>I even tried leaving "Common Language Runtime Exceptions" ticked, but unticking every one of it's children. But my app would still crash with an exception...</p> <p>Eventually, I realised that in the Exceptions dialog, I needed to <strong>add</strong> a new Exception type called "<em>System.Configuration.ConfigurationErrorsException</em>", click on OK, then UNTICK this new Exception type.</p> <p>Now, my app would run, the exception would silently occur, but the app would keep running.</p> <p>I do like WPF, but it's ridiculous how much time I waste chasing down silly problems like this that've been around for years.</p> <p>I wouldn't mind, but this was a WebService variable created by VS2008... and it's always worked fine. Until you ask WPF to pay attention to exceptions, that is...</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload