help.axcms.netAxinom Logo
Save Save Chapter Send Feedback

KB10031: System.Security.SecurtyException

If the ExceptionPublisher is not configured correctly or there are no active ExceptionPublishers, an exeption occurs


ExceptionManagement is configured through web.config (for example to send the exceptions per mail) but the ExceptionPublisherthrows an exception itself.

The exception:

Security Exception

Description: The application attempted to perform an operation not allowed by the security policy. To grant this application the required permissions please contact your system administrator or change the applications’s trust level in the configuration file.

Exception Details: System.Security.SecurtyException: Requested registry access is not allowed.

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack trace:

[SecurityException: Requested registry access is not allowed.]
Microsoft.Win32.RegistryKey.OpenSubKey(String name, Boolean writable) +473
System.Diagnostics.EventLog.FindSourceRegistration(String source, String machineName, Boolean readOnly) +295
System.Diagnostics.EventLog.SourceExists(String source, String machineName) +78
System.Diagnostics.EventLog.SourceExists(String source) +11


The ExceptionPublisher is not configured correctly or there are no active ExceptionPublishers, so the DefaultExceptionPublisher from Microsoft starts and tries to save the Exception to a EventLog, but the application has no permissions to do so


To give the application permissons to write into EventLog issue the following command:
C:\Windows\Microsoft.NET\Framework\v2.0.50727\installutil c:\projects\AxCMS\Components\Components\Microsoft.ApplicationBlocks.ExceptionManagement.dll


Read here more about exception management:

APPLIES TO versions: All versions