Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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.

share|improve this question
That looks like C#, but you should probably make it clear what language you are using. – Ben Pilbrow Dec 6 '11 at 20:05
I am using C# language. As mentioned in above code sample , C# has option to get notification when Security event entry is happened. Only issue is standard user gives exeception. Any idea. – Vivek Dec 7 '11 at 1:02
Guys , Any idea to solve this issue. – Vivek Dec 7 '11 at 8:36

to read security events on windows 7, add network service account to event log readers group.

share|improve this answer

Adding a user to the "Event Log Readers" group should work, at least according to Microsoft. Did you log the user off and back on? Keep in mind that group membership changes require a user to logon and logoff before it will work.

Please also keep in mind that giving a regular user access to the security event log might open your network up to attacks.

Finally, you should take a look at these articles, they explain how to apply custom permissions to event logs:

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.