Search

Thursday, October 7, 2010

Write Event Log error -> Exception: Unhandled Exception: System.Security.SecurityException: Requested registry access is not allowed.

When trying to write an event log, sometime we hit the error "Requested registry access is not allowed."

It's due to permission on registry entry for event log.

Solution:
1. Go to HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Eventlog.
2. Right-click Eventlog, and then click Permissions.
3. Add Everyone and give Full Control permission.

No comments:

Post a Comment