【发布时间】:2013-12-05 00:48:15
【问题描述】:
我收到错误:
未找到源,但无法找到部分或全部事件日志 搜索。无法访问的日志:安全性
当我运行以下代码以捕获 Win 2K12 R2 服务器 IIS 8.5 上的错误时
EventLog elog = new EventLog();
EventLog.CreateEventSource("MyApp", "Application");
EventLog.WriteEntry(Source, swError.ToString(), EventLogEntryType.Error);
我已授予对HKLM\SYSTEM\CurrentControlSet\services\eventlog 的完全访问权限,但它仍然无法正常工作。我该怎么做才能解决它?
【问题讨论】:
-
您为哪个用户授予了
HKLM\SYSTEM\CurrentControlSet\services\eventlog的完全访问权限? -
网络服务和IIS用户
-
您可能需要为您的application pool identity添加它
-
我的回答是否解决了问题?如果有其他问题,请报告。