0

I am running perfmon and have some counters specified for WebDev.WebServer40 so that I can get the metrics for my web service that is currently hosted locally in VS. One of the counters I have is # of Excepts Thrown. When I first start the service, it automatically jumps to 2 or 3. When I make the very first request to the service, it jumps to 7. Any subsequent requests don't cause the number to increase at all.

We are logging exceptions in code, but I am not seeing any in the logs. The service isn't crashing and the requests return the correct data.

Is there somewhere else I can look to see what those exceptions are? The only other place I have looked is in the Output window in Visual Studio (since I am debugging it).

Is it expected that there will be some framework exceptions on startup, or should I be able to get that number down to 0?

Thanks

bsayegh
  • 990
  • 6
  • 17
  • _"Is it expected that there will be some framework exceptions on startup"_ - yes, see the _"A First-Chance Exception ..."_ messages in your output window on startup, see also [What is a First Chance Exception?](http://blogs.msdn.com/b/davidklinems/archive/2005/07/12/438061.aspx). – CodeCaster Jan 06 '15 at 15:19

1 Answers1

0

"Is it expected that there will be some framework exceptions on startup" - yes, see the "A First-Chance Exception ..." messages in your output window on startup.." as CodeCaster say.

There is other type of exceptions, non-CLS-compliant exceptions

Exceptions that do not derive from System.Exception.

Languages that support exceptions that are not derived from Exception are free to handle these non-CLS compliant exceptions.

"Do not handle non-CLS-compliant exceptions using a parameterless catch block"

http://msdn.microsoft.com/en-us/library/vstudio/ms229005(v=vs.100).aspx Good luck!

MrVoid
  • 709
  • 5
  • 19
  • We are logging errors in all of our catch blocks, so I don't think its actually hitting a catch block. Whatever the exceptions are, they don't seem to stop the normal functions of the service or cause a break noticed by the debugger. – bsayegh Jan 06 '15 at 16:06