문제

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