我们使用一些使用 Microsoft.EnterpriseLibrary.Logging 作为服务运行的第三方软件。
最近该服务停止了很多次。我们只有来自 Windows 事件日志的数据。Stacktrace 显示 MS EntLib 日志记录引发了 ArgumentNullException。
Event Type: Error
Event Source: .NET Runtime
Event Category: None
Event ID: 1026
Date: 04/09/2012
Time: 19:05:23
User: N/A
Computer: XXX
Description:
Application: XXX.Service.exe
Framework Version: v4.0.30319
Description: The process was terminated due to an unhandled exception.
Exception Info: System.ArgumentNullException
Stack:
at Microsoft.Practices.EnterpriseLibrary.Logging.LogEntry.BuildCategoriesCollection(System.String)
at Microsoft.Practices.EnterpriseLibrary.Logging.Tracer.WriteTraceMessage(System.String, System.String, System.Diagnostics.TraceEventType)
at Microsoft.Practices.EnterpriseLibrary.Logging.Tracer.WriteTraceEndMessage(System.String)
at Microsoft.Practices.EnterpriseLibrary.Logging.Tracer.Dispose(Boolean)
at Microsoft.Practices.EnterpriseLibrary.Logging.Tracer.Dispose()
at XXX
我已经检查过了,看起来它是由以下原因引起的:
Trace.CorrelationManager.LogicalOperationStack.Peek()
返回空
谁能帮助我为什么会这样?