Archive for April, 2009

System.Security.SecurityException: Requested registry access is not allowed.

When using Exception Management Application Block I ran into the following error:

System.Security.SecurityException: The event source ExceptionManagerInternalException does not exist and cannot be created with the current permissions. —> System.Security.SecurityException: Requested registry access is not allowed.
at System.ThrowHelper.ThrowSecurityException(ExceptionResource resource)
at Microsoft.Win32.RegistryKey.OpenSubKey(String name, Boolean writable)
at System.Diagnostics.EventLog.CreateEventSource(EventSourceCreationData sourceData)
at System.Diagnostics.EventLog.CreateEventSource(String source, String logName)
at Microsoft.ApplicationBlocks.ExceptionManagement.DefaultPublisher. VerifyValidSource()

Darren J. McLeod has a blog post showing two possible solutions. I used the second one to create new event sources manually and then everything was fine.


Leave a Comment