G
Guest
Hi
I'm using the following code in a global class to add to the Windows
EventLog every time a try{} catch{} block fails...
if(!EventLog.SourceExists("darts"))
EventLog.CreateEventSource("darts", "Darts");
EventLog.WriteEntry("darts", msg, EventLogEntryType.Error);
This works great, but it doesn't populate the User field in the EventLog (it
says N/A). I'd like this to be populated with the value of
HttpContext.Current.User.Identity.Name.
Is it possible to populate this field!?
I'm using the following code in a global class to add to the Windows
EventLog every time a try{} catch{} block fails...
if(!EventLog.SourceExists("darts"))
EventLog.CreateEventSource("darts", "Darts");
EventLog.WriteEntry("darts", msg, EventLogEntryType.Error);
This works great, but it doesn't populate the User field in the EventLog (it
says N/A). I'd like this to be populated with the value of
HttpContext.Current.User.Identity.Name.
Is it possible to populate this field!?