【发布时间】:2026-01-08 15:05:01
【问题描述】:
我写过:
.
.
.
//Log exception to the event log
if (!EventLog.SourceExists("PodaHIS")) {
EventLog.CreateEventSource("PodaHIS", "Application");
}
EventLog eventLog = new EventLog();
eventLog.Log = "Application";
eventLog.Source = "PodaHIS";
eventLog.WriteEntry(error.ToString(), EventLogEntryType.Error);
我还启用了对 LOCALMACHINE\ASPNET 的读取权限。
作为回报,我得到:
The source was not found, but some or all event logs could not be searched. Inaccesible logs: Security.
有人知道为什么会这样吗?
【问题讨论】: