سؤال

How to view the output of the Trace.WriteLine .Net function while the application is not in debug mode? It is run with IIS EXPRESS. The result is a success status code, not failed.

هل كانت مفيدة؟

المحلول

You can use trace.writeline with both mode release and debug the only required thing is in web.config you should have trace enabled.

See this link - Trace.WriteLine in release mode?

If you want to output your trace.writeline then you need to add tracelistner. See following - http://msdn.microsoft.com/en-us/library/system.diagnostics.tracelistener.aspx

Following links are example how you can create trace listners.

http://msdn.microsoft.com/en-us/library/ff650498.aspx http://www.codeproject.com/Articles/2680/Writing-custom-NET-trace-listeners

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top