出于某种原因,当我在 web.config 中使用模拟选项时。System.Diagnostics.TraceSource
一切都很好,但一个问题困扰着我,即在使用写入事件日志时发生以下错误:
System.Web.HttpUnhandledException (0x80004005):
Exception of type 'System.Web.HttpUnhandledException' was thrown.
---> System.ComponentModel.Win32Exception (0x80004005):
Access is denied at System.Diagnostics.EventLogInternal.InternalWriteEvent(UInt32 eventID, UInt16 category, EventLogEntryType type, String[] strings, Byte[] rawData, String currentMachineName)
at System.Diagnostics.EventLogInternal.WriteEvent(EventInstance instance, Byte[] data, Object[] values)
at System.Diagnostics.TraceSource.TraceEvent(TraceEventType eventType, Int32 id, String message)
有人给我一些建议吗?提前致谢。