高分求救(在线等待)
下面是我在执行程序后出现的安全性错误:
安全性异常
说明: 应用程序试图执行安全策略不允许的操作。要授予此应用程序所需的权限,请与系统管理员联系,或在配置文件中更改该应用程序的信任级别。
异常详细信息: System.Security.SecurityException: 不允许所请求的注册表访问权。
源错误:
行 27: protected void LogEvent(string message, EventLogEntryType entryType)
行 28: {
行 29: if (!EventLog.SourceExists("ThePhile.COM"))
行 30: {
行 31: EventLog.CreateEventSource("ThePhile.COM", "Application");
请高手帮忙解决一下
问题点数:100、回复次数:2Top
1 楼saucer(思归)回复于 2003-02-03 15:40:58 得分 100
aspx pages are normally run under ASPNET account which doesn't have permissions to access event logs, try to give the account the permissions or change the web.config or machine.config to run under SYSTEM account or use impersonationTop
2 楼saucer(思归)回复于 2003-02-03 16:09:54 得分 0
see
PRB: "Requested Registry Access Is Not Allowed" Error Message When ASP.NET Application Tries to Write New EventSource in the EventLog
http://support.microsoft.com/default.aspx?scid=kb;EN-US;Q329291Top




