BUG: EntryWritten Event Stops Occurring After EventLog.Clear Method Is Called (328380)
The information in this article applies to:
- Microsoft .NET Framework 1.0
- Microsoft .NET Framework 1.1
- Microsoft Platform Software Development Kit (SDK) 1.0
- Microsoft .NET Framework Class Libraries 1.0
- Microsoft .NET Framework Class Libraries 1.1
This article was previously published under Q328380 SYMPTOMS You can use an EventLog object to receive notification when
new entries are added to an event log. To do this, assign an
EntryWrittenEventHandler delegate to the EventLog.EntryWritten event, and then set the EventLog.EnableRaisingEvents property to True.
The problem occurs after you call the EventLog.Clear() method, which causes the EventLog.EnableRaisingEvents property to be set to False. Even after you reset this property to True, the EntryWritten event does not fire again until the count of records in the log
exceeds the number of records that were present before the log was cleared.
RESOLUTION To work around this problem, you must create a new EventLog object after you call the EventLog.Clear() method. STATUSMicrosoft has confirmed that this is a bug in the Microsoft
products that are listed at the beginning of this article.
Modification Type: | Major | Last Reviewed: | 10/20/2003 |
---|
Keywords: | kbbug kbEventLog kbKernBase kbpending KB328380 kbAudDeveloper |
---|
|