I’ve encountered a situation, when Page’s design completely hides Trace info. I’m looking for easiest way, shortcut to gather this information. I mean without reimplementing whole infrastructure.
So:
-
Is it possible to change the way ASP.NET adds trace info into markup?
-
Or is it possible to intercept Trace data rendered into html in order
to send it via smtp or put in log file?
In your web.config:
The important bit is
writeToDiagnosticsTrace="true"which redirects the trace to the configured diagnostic listener(s) which in this example is a file calledlogger.txtthat will be created at the root of your site. Obviously leaving such files at the root of your site makes them visible to anyone so it would be better to configure another trace listener.Also checkout the following article on MSDN.