请教各位大侠:这个错误信息是我那里没设好?

crystallac 2003-07-24 09:21:04
“/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
...全文
36 4 打赏 收藏 转发到动态 举报
写回复
用AI写文章
4 条回复
切换为时间正序
请发表友善的回复…
发表回复
crystallac 2003-07-24
  • 打赏
  • 举报
回复
哦,是不是权限集应该具有“注册表”的访问权限
crystallac 2003-07-24
  • 打赏
  • 举报
回复
谢谢,

权限集说明:
Allows full access to all resources

这应该是最广的权限吧
Montaque 2003-07-24
  • 打赏
  • 举报
回复
运行mscorcfg.msc,配置你的code group权限。
crystallac 2003-07-24
  • 打赏
  • 举报
回复
to MonTaque:
我该怎么去配才能解决这个问题啊,搞了老半天,还是没能把问题给解决掉,抽空指点下吧。盼复!谢谢!


110,825

社区成员

发帖
与我相关
我的任务
社区描述
.NET技术 C#
社区管理员
  • C#
  • AIGC Browser
  • by_封爱
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告

让您成为最强悍的C#开发者

试试用AI创作助手写篇文章吧