Can I redirect tracing to a file
Answer / kirti
Yes. The Debug and Trace classes both have a Listeners property, which is a collection of sinks that receive the tracing that you send via Debug.WriteLine and Trace.WriteLine respectively. By default the Listeners collection contains a single sink, which is an
instance of the DefaultTraceListener class. This sends output to the Win32 OutputDebugString() function and also the System.Diagnostics.Debugger.Log() method. This is useful when debugging, but if you're trying to trace a problem at a customer site, redirecting the output to a file is more appropriate. Fortunately, the TextWriterTraceListener class is provided for this purpose.
| Is This Answer Correct ? | 0 Yes | 0 No |
Can a view be shared across multiple controllers? If yes, how we can do that?
What is the 'page life cycle' of an ASP.NET MVC?
What are the components required to create a route in ASP.Net MVC?
How do you handle variable number of segments in a route definition?
Explain the advantages of asp.net mvc over asp.net?
Which filter executes first in an asp.net mvc application?
Is entity framework slow?
How to make sure Client Validation is enabled in ASP.Net MVC
What are the types of assemblies
mention what is the key advantage of using entity framework or ef?
what do you mean by navigation property?
How does the .net framework 3.0 relate to the .net framework 2.0?