Hi, i have the code below in a ASP.NET web page...
System.Diagnostics.EventLogTraceListener oEventLogTraceListener = null;
oEventLogTraceListener = new EventLogTraceListener("TestLogSource");
System.Diagnostics.Trace.Listeners.Add(oEventLogTr aceListener);
oEventLogTraceListener.Write("Test Output");
System.Diagnostics.Trace.WriteLine("Test Output");
The problem here is the line
oEventLogTraceListener.Write("Test Output") writes an entry to the event log
but the other statement
System.Diagnostics.Trace.Write("Test Output"); does not create an entry
Am i missing something? Please help.
Also, please let me know the best practice for using EventLogTraceListener. I have another webpage in my application and i would want a different source name for output written from this page. How should i proceed with that?
Rega ...
Go to the complete details ...