2
我想写入默认的应用程序事件日志而无需自动创建事件日志源或通过EventLog.CreateEventSource
。该程序可能以非管理员身份运行,无法创建事件日志源。此应用程序没有安装程序。在这种情况下,我可以指定哪些来源“始终有效”?在不创建源的情况下写入应用程序日志
以供参考,该错误信息是:
System.Security.SecurityException: The source was not found, but some or all event logs could not be searched. To create the source, you need permission to read all event logs to make sure that the new source name is unique. Inaccessible logs: Security.