Does this code work?
if(!System.Diagnostics.EventLog.SourceExists("MyAp p"))
{
System.Diagnostics.EventLog.CreateEventSource("MyA pp", "Application");
}
System.Diagnostics.EventLog.WriteEntry("MyApp", "Test!");
This may also be of interest to you since it's an ASP.NET application:
http://support.microsoft.com/default...b;en-us;329291
"Buz Waitz" <bw****@sbcglobal.net> wrote in message
news:OV**************@TK2MSFTNGP11.phx.gbl...
I'm trying to write to the application error log in a user control and am
getting the message that the source property was not set before writing to
the error log. I'm having trouble tracking down the cause of the error.
Any help, please?
Buz