J
John
Is there any special code I have to write to log event to Security
Event Log? The following code give me "Very Easy Question, How to
write log to SECURTY Event Log? Please help" Error
// Create an EventLog instance and assign its source.
EventLog myLog = new EventLog();
myLog.Source = "Security";
// Write an informational entry to the event log.
myLog.WriteEntry("Writing warning to event log.",
EventLogEntryType.Warning);
but as soon as I change "Security" to "Application" ,
everything works fine
// Create an EventLog instance and assign its source.
EventLog myLog = new EventLog();
myLog.Source = "Application";
// Write an informational entry to the event log.
myLog.WriteEntry("Writing warning to event log.",
EventLogEntryType.Warning);
Any ideas?
Thanks in advance
John
Event Log? The following code give me "Very Easy Question, How to
write log to SECURTY Event Log? Please help" Error
// Create an EventLog instance and assign its source.
EventLog myLog = new EventLog();
myLog.Source = "Security";
// Write an informational entry to the event log.
myLog.WriteEntry("Writing warning to event log.",
EventLogEntryType.Warning);
but as soon as I change "Security" to "Application" ,
everything works fine
// Create an EventLog instance and assign its source.
EventLog myLog = new EventLog();
myLog.Source = "Application";
// Write an informational entry to the event log.
myLog.WriteEntry("Writing warning to event log.",
EventLogEntryType.Warning);
Any ideas?
Thanks in advance
John