Click to See Complete Forum and Search --> : Exception Management


New comer
October 9th, 2003, 05:31 AM
Hi

I am trying to use Exception management block.

I get this exception when my code tries to publish custom exception.

****************************************************

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

Exception Details: System.Security.SecurityException: 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.CreateEventSource(String source, String logName, String

machineName, Boolean useMutex) +444
System.Diagnostics.EventLog.CreateEventSource(String source, String logName, String

machineName) +11
System.Diagnostics.EventLog.CreateEventSource(String source, String logName) +11
Microsoft.ApplicationBlocks.ExceptionManagement.DefaultPublisher.VerifyValidSource()

****************************************************
Any help is appreciated.

Thanks in advance

Newcomer

New comer
November 7th, 2003, 03:21 AM
Well After giving ASPNET account administrator privilege, it got resolved

TheCPUWizard
January 28th, 2004, 04:05 PM
Your solution completely opens up your server to all sorts of security risks. ASPNET should "NEVER" be given any permissions above the absolute minimum. There are alternative ways to handle this.