Blog Archive

Search Blog

Blog List

Contact Me






Enter the code shown above in the box below
Send

 

Announcements

Recommended Websites

Events

Event StartEvent EndTitle

Recommended Reading

Most recent blog entries

Jan 21

Written by: Darren McLeod
Wednesday, January 21, 2009 5:48 PM 

 If you get the following error when using the Microsoft.ApplicationBlocks.ExceptionManagement library:

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()
 
One way of solving this is to install the Microsoft.ApplicationBlocks.ExceptionManagement.dll by running the following in a dos window:
C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\InstallUtil.exe Microsoft.ApplicationBlocks.ExceptionManagement.dll
 
If for some reason your server admin doesn’t want to do that then you can just ask him to create the two event sources manually using eventcreate in a dos window:
eventcreate /t error /id 1000 /so ExceptionManagerInternalException /l application /d "new src ExceptionManagerInternalException in application log"
eventcreate /t error /id 1000 /so ExceptionManagerPublishedException /l application /d "new src ExceptionManagerPublishedException in application log"
 

Tags:

Your name:
Your email:
(Optional) Email used only to show Gravatar.
Your website:
Title:
Comment:
Security Code
Enter the code shown above in the box below
Add Comment   Cancel