【发布时间】:2012-07-16 19:46:39
【问题描述】:
我的应用程序调用一个库(我没有控制权),它创建一个新的 EventLog 源并使用 EventLog.SourceExists。它抛出System.Security.SecurityException: The source was not found, but some or all event logs could not be searched. Inaccessible logs: Security.
该应用需要对HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\eventlog\Security 的读取权限。如何向注册表授予网络服务权限(以编程方式)?
感谢任何指点。
【问题讨论】:
标签: c# .net security registry event-log