根据我们的策略,我们不再允许写入事件日志,因此我将所有事件日志代码从写入事件日志中删除,这有效,但是我不断从错误中获取随机ASP.NET 4.0警告,即使我有我的Application_Error中的代码来处理所有错误.
有没有完全禁用事件日志记录的方法,可能是web.config更改或IIS设置禁用它?
注意到它也存在很多错误……不仅仅是我的HTTPHandler
EventLog记录的示例:
Event code: 3005 Event message: An unhandled exception has occurred. Event time: 9/8/2011 10:26:04 AM Event time (UTC): 9/8/2011 2:26:04 PM Event ID: 6b56761296d24e1aa01038ce125be044 Event sequence: 97 Event occurrence: 1 Event detail code: 0 Application information: Application domain: /LM/W3SVC/1/ROOT/-2-129599642336131368 Trust level: Full Application Virtual Path: / Application Path: Machine name: Process information: Process ID: 6396 Process name: w3wp.exe Account name: IIS APPPOOL\MyAppPool Exception information: Exception type: System.Exception Exception message: STACKTRACE