请教各位大侠:这个错误信息是我那里没设好?
“/ThePhile”应用程序中的服务器错误。
--------------------------------------------------------------------------------
安全性异常
说明: 应用程序试图执行安全策略不允许的操作。要授予此应用程序所需的权限,请与系统管理员联系,或在配置文件中更改该应用程序的信任级别。
异常详细信息: System.Security.SecurityException: 不允许所请求的注册表访问权。
源错误:
行 29: if (!EventLog.SourceExists("ThePhile.COM"))
行 30: {
行 31: EventLog.CreateEventSource("ThePhile.COM", "Application");
行 32: }
行 33: EventLog.WriteEntry("ThePhile.COM", message, entryType);
源文件: E:\wrox\ThePhile\PhilePage.cs 行: 31
堆栈跟踪:
[SecurityException: 不允许所请求的注册表访问权。]
Microsoft.Win32.RegistryKey.OpenSubKey(String name, Boolean writable) +473
System.Diagnostics.EventLog.CreateEventSource(String source, String logName, String machineName, Boolean useMutex) +445
System.Diagnostics.EventLog.CreateEventSource(String source, String logName, String machineName) +11
System.Diagnostics.EventLog.CreateEventSource(String source, String logName) +11
Wrox.ThePhile.Web.PhilePage.LogEvent(String message, EventLogEntryType entryType) in E:\wrox\ThePhile\PhilePage.cs:31
Wrox.ThePhile.Web.PhilePage.PhilePage_Error(Object sender, EventArgs e) in E:\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() +2065
System.Web.UI.Page.ProcessRequest() +117
System.Web.UI.Page.ProcessRequest(HttpContext context) +18
System.Web.CallHandlerExecutionStep.Execute() +179
System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +87
--------------------------------------------------------------------------------
版本信息: Microsoft .NET 框架版本:1.0.3705.0; ASP.NET 版本:1.0.3705.0