security problem...
dear all
How can i solve this error??THX SO MUCH
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 29: if (!EventLog.SourceExists("ThePhile.COM"))
Line 30: {
Line 31: EventLog.CreateEventSource("ThePhile.COM", "Application");
Line 32: }
Line 33: EventLog.WriteEntry("ThePhile.COM", message, entryType);
Source File: C:\wrox\ThePhile\PhilePage.cs Line: 31
Stack Trace:
[SecurityException: Requested registry access is not allowed.]
Microsoft.Win32.RegistryKey.OpenSubKey(String name, Boolean writable) +473
System.Diagnostics.EventLog.CreateEventSource(Stri ng source, String logName, String machineName, Boolean useMutex) +445
System.Diagnostics.EventLog.CreateEventSource(Stri ng source, String logName, String machineName) +11
System.Diagnostics.EventLog.CreateEventSource(Stri ng source, String logName) +11
Wrox.ThePhile.Web.PhilePage.LogEvent(String message, EventLogEntryType entryType) in C:\wrox\ThePhile\PhilePage.cs:31
Wrox.ThePhile.Web.PhilePage.PhilePage_Error(Object sender, EventArgs e) in C:\wrox\ThePhile\PhilePage.cs:54
System.Web.UI.TemplateControl.OnError(EventArgs e) +109
System.Web.UI.Page.HandleError(Exception e) +68
System.Web.UI.Page.ProcessRequestMain() +2094
System.Web.UI.Page.ProcessRequest() +218
System.Web.UI.Page.ProcessRequest(HttpContext context) +18
System.Web.CallHandlerExecutionStep.System.Web.Htt pApplication+IExecutionStep.Execute() +179
System.Web.HttpApplication.ExecuteStep(IExecutionS tep step, Boolean& completedSynchronously) +87
--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:1.1.4322.573; ASP.NET Version:1.1.4322.573
|