【发布时间】:2020-10-28 20:52:22
【问题描述】:
我在登录 eventviewer 时收到此错误。我正在事件查看器和滚动平面文件中寻找异常。如果我删除 eventviewer 部分,则滚动平面文件可以完美运行,但只有当我添加它时它才会给出异常
{"依赖解析失败,类型= \"Microsoft.Practices.EnterpriseLibrary.Logging.LogWriter\",名称 = \"(none)\"。\r\n出现异常 while: 解析时。\r\n异常 是:InvalidOperationException - TraceListener 类型不能是 建。你必须配置容器来提供这个 值。\r\n-------------------------------------------- ---\r\n在 异常发生的时间,容器是:\r\n\r\n Resolving Microsoft.Practices.EnterpriseLibrary.Logging.LogWriterImpl,LogWriter.默认 (映射自 Microsoft.Practices.EnterpriseLibrary.Logging.LogWriter, (none))\r\n 解析构造函数的参数“structureHolder” Microsoft.Practices.EnterpriseLibrary.Logging.LogWriterImpl(Microsoft.Practices.EnterpriseLibrary.Logging.LogWriterStructureHolder 结构持有人, Microsoft.Practices.EnterpriseLibrary.Logging.Instrumentation.ILoggingInstrumentationProvider 仪器提供者, Microsoft.Practices.EnterpriseLibrary.Logging.ILoggingUpdateCoordinator updateCoordinator)\r\n 正在解决 Microsoft.Practices.EnterpriseLibrary.Logging.LogWriterStructureHolder,LogWriterStructureHolder.默认 (映射自 Microsoft.Practices.EnterpriseLibrary.Logging.LogWriterStructureHolder, (none))\r\n 解析构造函数的参数“traceSources” Microsoft.Practices.EnterpriseLibrary.Logging.LogWriterStructureHolder(System.Collections.Generic.IEnumerable
1[[Microsoft.Practices.EnterpriseLibrary.Logging.Filters.ILogFilter, Microsoft.Practices.EnterpriseLibrary.Logging, Version=5.0.414.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]] filters, System.Collections.Generic.IEnumerable1[[System.String, mscorlib, 版本=4.0.0.0,文化=中性,PublicKeyToken=b77a5c561934e089]] 跟踪源名称, System.Collections.Generic.IEnumerable1[[Microsoft.Practices.EnterpriseLibrary.Logging.LogSource, Microsoft.Practices.EnterpriseLibrary.Logging, Version=5.0.414.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]] traceSources, Microsoft.Practices.EnterpriseLibrary.Logging.LogSource allEventsTraceSource, Microsoft.Practices.EnterpriseLibrary.Logging.LogSource notProcessedTraceSource, Microsoft.Practices.EnterpriseLibrary.Logging.LogSource errorsTraceSource, System.String defaultCategory, System.Boolean tracingEnabled, System.Boolean logWarningsWhenNoCategoriesMatch, System.Boolean revertImpersonation)\r\n Resolving Microsoft.Practices.EnterpriseLibrary.Logging.LogSource,General\r\n1[[System.Diagnostics.TraceListener, 系统,版本=4.0.0.0,文化=中性, PublicKeyToken=b77a5c561934e089]] 跟踪监听器, System.Diagnostics.SourceLevels 级别,System.Boolean autoFlush, Microsoft.Practices.EnterpriseLibrary.Logging.Instrumentation.ILoggingInstrumentationProvider instrumentationProvider)\r\n 正在解决 System.Diagnostics.TraceListener,事件日志跟踪监听器\r\n"}
Resolving parameter \"traceListeners\" of constructor Microsoft.Practices.EnterpriseLibrary.Logging.LogSource(System.String name, System.Collections.Generic.IEnumerable
【问题讨论】:
标签: asp.net-mvc