EntryWrittenEventHandler Security Log

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Vinny

    #1

    EntryWrittenEventHandler Security Log

    Greetings,

    I have the following code fragment that fires an event
    when an entry is written to the Application and System
    event logs. For some reason, an event is NOT fired when
    an entry is written to the Security Log.

    I do not beleive it is a rights issue as I can
    programatically enumerate the Security Log. Any
    comments, suggestions etc. would be appreciated.

    Thanks...

    EventLog[] eventLogs;
    eventLogs = EventLog.GetEve ntLogs();
    foreach ( EventLog eventLog in eventLogs)
    {
    eventLog.EntryW ritten += new
    EntryWrittenEve ntHandler(Entry Written);
    eventLog.Enable RaisingEvents =
    true;
    }

Working...