EventLog.CreateEventSource
Help! How do I modify the required permissions as indicated in the error message below in order to create a new Event Log?
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:
Line 25: if(!(EventLog.SourceExists(SourceName)))
Line 26: {
Line 27: EventLog.CreateEventSource(SourceName, LogName);
Line 28: }
Line 29:
Source File: C:\BegASPNET\ch17\entrytolog.aspx Line: 27
Thanks in advance.
|