I am trying to read the Windows Security Event log by notification.
Below is sample line of code, but when I run it on Windows 7 with a standard user I get an Exception:
EventLog _eventlog = new EventLog("Security"); //Monitor on the Security events _eventlog.EntryWritten += new EntryWrittenEventHandler(OnSecurityEventLogWritten); _eventlog.EnableRisingEvents = True; // I get an exception at this line with a Windows 7 standard user
I am getting the exception saying
Requested Registry is not allowed. I tried adding the user to the Event Log Readers Group but that did not help.
It's important to note that when I run this application with local admin rights it works fine.
My requirement is to get the notification when Windows Security events and written for a standard login user.