从iis7 Web应用程序写入eventlog失败
我正在尝试部署一个.NET Web应用程序,使用模拟来完成安全性。 写入事件日志在我的开发框(Win 2003 IIS6)上工作正常,但将应用程序放在活动框(Win 2008 IIS7)后,我得到以下; Access is denied [Win32Exception (0x80004005): Access is denied] [InvalidOperationException: Cannot open log for source 'MyApp'. You may not have write access.] System.Diagnostics.EventLog.OpenForWrite(String currentMachineName) +1815151 System.Diagnostics.EventLog.InternalWriteEvent(UInt32 eventID, UInt16 category, EventLogEntryType type, String[] strings, Byte[] rawData, String currentMachineName) +452 System.Diagnostics.EventLog.WriteEntry(String message, EventLogEntryType type, Int32 eventID, Int16 category, Byte[] rawData) +463 […]