Tracing Not Working

This was a really annoying error. Again the lack of installed entity framework inside the project caused the service to be unusable. All the services worked in VS but not after deployment. I've added tracing to my application. Guess what? It didn't work. I had no idea what was happening.

After researching it turned out that tracing works only if you add the switchValue or switchName.

Enumerated value Integer value Type of message displayed (or written to a specified output target)
Off 0 None
Error 1 Only error messages
Warning 2 Warning messages and error messages
Info 3 Informational messages, warning messages, and error messages
Verbose 4 Verbose messages, informational messages, warning messages, and error messages

How on Earth was it working before?

Anyway, I've added the switchValue to my Diagnostics.config:

and everything started working.

The conclusion from this experience is one. Make sure you know what happens in your application, because you can't predict everything, but you can fix a lot.

Leave Comment

Your email address will not be published.

Please type the characters of this captcha image in the input box

Please type the characters of this captcha image in the input box