By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,467 Members | 1,448 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,467 IT Pros & Developers. It's quick & easy.

An unhandled exception of type 'System.Security.SecurityException' occurred in mscorlib.dll Additional information: Requested registry access is not allowed.

P: n/a
This is my problem. I am using Visual 2003, .Net framework 1.1 and the
Application Block
I configured the DAAB using the Enterprise Library Configuration

now this is the error which is coming

Security 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.FindSourceRegistration (String source, String
machineName, Boolean readOnly)
System.Diagnostics.EventLog.SourceExists(String source, String machineName)
System.Diagnostics.EventLog.WriteEntry(String message, EventLogEntryType
type, Int32 eventID, Int16 category, Byte[] rawData)
System.Diagnostics.EventLog.WriteEntry(String message, EventLogEntryType
type, Int32 eventID, Int16 category)
System.Diagnostics.EventLog.WriteEntry(String message, EventLogEntryType
type, Int32 eventID)
System.Diagnostics.EventLog.WriteEntry(String message, EventLogEntryType
type)
Microsoft.Practices.EnterpriseLibrary.Common.Instr umentation.PerformanceCounte
rInstances.ReportCounterFailure(String message)
Microsoft.Practices.EnterpriseLibrary.Common.Instr umentation.PerformanceCounte
rInstances..ctor(String categoryName, String counterName, Boolean
createNewInstance)
Microsoft.Practices.EnterpriseLibrary.Common.Instr umentation.InstrumentedEvent
..AddPerformanceCounter(String category, String[] counterNames, Boolean
createNewInstance)
Microsoft.Practices.EnterpriseLibrary.Common.Instr umentation.InstrumentedEvent
..Initialize(String counterCategory, String[] counterNames, Boolean
createNewInstance, String eventLogSource, EventLogIdentifier[] eventIds)
Microsoft.Practices.EnterpriseLibrary.Common.Instr umentation.InstrumentedEvent
...ctor(String counterCategory, String[] counterNames, Boolean
createNewInstance)
Microsoft.Practices.EnterpriseLibrary.Data.Instrum entation.DataServiceEvent..c
tor(String[] counterNames)
Microsoft.Practices.EnterpriseLibrary.Data.Instrum entation.DataCommandFailedEv
ent..ctor(String[] counterNames)
Microsoft.Practices.EnterpriseLibrary.Data.Instrum entation.DataCommandFailedEv
ent..cctor()

Apr 5 '06 #1
Share this Question
Share on Google+
3 Replies


P: n/a
You are getting this error at run-time or in development environment?

VJ

"Ankit Aneja" <ef*****@newsgroups.nospam> wrote in message
news:uM**************@TK2MSFTNGP05.phx.gbl...
This is my problem. I am using Visual 2003, .Net framework 1.1 and the
Application Block
I configured the DAAB using the Enterprise Library Configuration

now this is the error which is coming

Security 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.FindSourceRegistration (String source, String
machineName, Boolean readOnly)
System.Diagnostics.EventLog.SourceExists(String source, String
machineName)
System.Diagnostics.EventLog.WriteEntry(String message, EventLogEntryType
type, Int32 eventID, Int16 category, Byte[] rawData)
System.Diagnostics.EventLog.WriteEntry(String message, EventLogEntryType
type, Int32 eventID, Int16 category)
System.Diagnostics.EventLog.WriteEntry(String message, EventLogEntryType
type, Int32 eventID)
System.Diagnostics.EventLog.WriteEntry(String message, EventLogEntryType
type)
Microsoft.Practices.EnterpriseLibrary.Common.Instr umentation.PerformanceCounte
rInstances.ReportCounterFailure(String message)
Microsoft.Practices.EnterpriseLibrary.Common.Instr umentation.PerformanceCounte
rInstances..ctor(String categoryName, String counterName, Boolean
createNewInstance)
Microsoft.Practices.EnterpriseLibrary.Common.Instr umentation.InstrumentedEvent
.AddPerformanceCounter(String category, String[] counterNames, Boolean
createNewInstance)
Microsoft.Practices.EnterpriseLibrary.Common.Instr umentation.InstrumentedEvent
.Initialize(String counterCategory, String[] counterNames, Boolean
createNewInstance, String eventLogSource, EventLogIdentifier[] eventIds)
Microsoft.Practices.EnterpriseLibrary.Common.Instr umentation.InstrumentedEvent
..ctor(String counterCategory, String[] counterNames, Boolean
createNewInstance)
Microsoft.Practices.EnterpriseLibrary.Data.Instrum entation.DataServiceEvent..c
tor(String[] counterNames)
Microsoft.Practices.EnterpriseLibrary.Data.Instrum entation.DataCommandFailedEv
ent..ctor(String[] counterNames)
Microsoft.Practices.EnterpriseLibrary.Data.Instrum entation.DataCommandFailedEv
ent..cctor()

Apr 5 '06 #2

P: n/a
at run time
and its running fine on other machine
"Vijay" <vi***@msdiscussions.com> wrote in message
news:e0**************@TK2MSFTNGP02.phx.gbl...
You are getting this error at run-time or in development environment?

VJ

"Ankit Aneja" <ef*****@newsgroups.nospam> wrote in message
news:uM**************@TK2MSFTNGP05.phx.gbl...
This is my problem. I am using Visual 2003, .Net framework 1.1 and the
Application Block
I configured the DAAB using the Enterprise Library Configuration

now this is the error which is coming

Security 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.FindSourceRegistration (String source, String
machineName, Boolean readOnly)
System.Diagnostics.EventLog.SourceExists(String source, String
machineName)
System.Diagnostics.EventLog.WriteEntry(String message, EventLogEntryType
type, Int32 eventID, Int16 category, Byte[] rawData)
System.Diagnostics.EventLog.WriteEntry(String message, EventLogEntryType
type, Int32 eventID, Int16 category)
System.Diagnostics.EventLog.WriteEntry(String message, EventLogEntryType
type, Int32 eventID)
System.Diagnostics.EventLog.WriteEntry(String message, EventLogEntryType
type)
Microsoft.Practices.EnterpriseLibrary.Common.Instr umentation.PerformanceCounte
rInstances.ReportCounterFailure(String message)
Microsoft.Practices.EnterpriseLibrary.Common.Instr umentation.PerformanceCounte
rInstances..ctor(String categoryName, String counterName, Boolean
createNewInstance)
Microsoft.Practices.EnterpriseLibrary.Common.Instr umentation.InstrumentedEvent
.AddPerformanceCounter(String category, String[] counterNames, Boolean
createNewInstance)
Microsoft.Practices.EnterpriseLibrary.Common.Instr umentation.InstrumentedEvent
.Initialize(String counterCategory, String[] counterNames, Boolean
createNewInstance, String eventLogSource, EventLogIdentifier[] eventIds)
Microsoft.Practices.EnterpriseLibrary.Common.Instr umentation.InstrumentedEvent
..ctor(String counterCategory, String[] counterNames, Boolean
createNewInstance)
Microsoft.Practices.EnterpriseLibrary.Data.Instrum entation.DataServiceEvent..c
tor(String[] counterNames)
Microsoft.Practices.EnterpriseLibrary.Data.Instrum entation.DataCommandFailedEv
ent..ctor(String[] counterNames)
Microsoft.Practices.EnterpriseLibrary.Data.Instrum entation.DataCommandFailedEv
ent..cctor()


Apr 6 '06 #3

P: n/a
Ankit Aneja wrote:
This is my problem. I am using Visual 2003, .Net framework 1.1 and the
Application Block
I configured the DAAB using the Enterprise Library Configuration

now this is the error which is coming

Security 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.FindSourceRegistration (String source, String
machineName, Boolean readOnly)
System.Diagnostics.EventLog.SourceExists(String source, String machineName)
System.Diagnostics.EventLog.WriteEntry(String message, EventLogEntryType
type, Int32 eventID, Int16 category, Byte[] rawData)
System.Diagnostics.EventLog.WriteEntry(String message, EventLogEntryType
type, Int32 eventID, Int16 category)
System.Diagnostics.EventLog.WriteEntry(String message, EventLogEntryType
type, Int32 eventID)
System.Diagnostics.EventLog.WriteEntry(String message, EventLogEntryType
type)
Microsoft.Practices.EnterpriseLibrary.Common.Instr umentation.PerformanceCounte
rInstances.ReportCounterFailure(String message)
Microsoft.Practices.EnterpriseLibrary.Common.Instr umentation.PerformanceCounte
rInstances..ctor(String categoryName, String counterName, Boolean
createNewInstance)
Microsoft.Practices.EnterpriseLibrary.Common.Instr umentation.InstrumentedEvent
.AddPerformanceCounter(String category, String[] counterNames, Boolean
createNewInstance)
Microsoft.Practices.EnterpriseLibrary.Common.Instr umentation.InstrumentedEvent
.Initialize(String counterCategory, String[] counterNames, Boolean
createNewInstance, String eventLogSource, EventLogIdentifier[] eventIds)
Microsoft.Practices.EnterpriseLibrary.Common.Instr umentation.InstrumentedEvent
..ctor(String counterCategory, String[] counterNames, Boolean
createNewInstance)
Microsoft.Practices.EnterpriseLibrary.Data.Instrum entation.DataServiceEvent..c
tor(String[] counterNames)
Microsoft.Practices.EnterpriseLibrary.Data.Instrum entation.DataCommandFailedEv
ent..ctor(String[] counterNames)
Microsoft.Practices.EnterpriseLibrary.Data.Instrum entation.DataCommandFailedEv
ent..cctor()

hi,
The problem have encountered was faced by me back in January. I was
also doubtful abt the solution. But after analyzing , i found that
running "Install Services" in the Enterprise library will solve the
problem. This batch file edit the registry entries. I hope this may
solve ur problem.

Regards,
Sandeep
Apr 6 '06 #4

This discussion thread is closed

Replies have been disabled for this discussion.

Browse more C# / C Sharp Questions on Bytes