【问题标题】:InvalidOperationException - The type LogWriter cannot be constructed. You must configure the container to supply this valueInvalidOperationException - 无法构造类型 LogWriter。您必须配置容器以提供此值
【发布时间】:2019-04-04 07:52:26
【问题描述】:

当我尝试从 BizTalk 业务流程中记录某些内容时,我在事件日志中收到以下错误消息。

Error using Info(System.String,System.String): Resolution of the dependency failed, type = "Microsoft.Practices.EnterpriseLibrary.Logging.LogWriter", name = "(none)".
Exception occurred while: while resolving.
Exception is: InvalidOperationException - The type LogWriter cannot be constructed. You must configure the container to supply this value.
-----------------------------------------------
At the time of the exception, the container was:

  Resolving Microsoft.Practices.EnterpriseLibrary.Logging.LogWriter,(none)
 Inner exception: The type LogWriter cannot be constructed. You must configure the container to supply this value.

为了登录 BizTalk 业务流程,我创建了一个使用 Microsoft Enterprise Library 5 的自定义 .net 组件。Entlib 日志记录的配置位于专用文件中,并且来自 BizTalk 配置文件 BTSNTSvc.exe.config 和 BTSNTSvc64.exe.config ,entlib.config 文件被引用。我正在使用 BizTalk 2016 和 VS2015。

我正在尝试在纯文本文件中记录文本。

【问题讨论】:

    标签: logging .net-4.0 enterprise-library enterprise-library-5 biztalk-2016


    【解决方案1】:

    有一个关于这个问题的 msdn 论坛帖子。 https://social.msdn.microsoft.com/Forums/en-US/8edb589c-a488-49ec-aca7-5c5219940fbb/biztalk-enterprise-library-logging-issue?forum=biztalkgeneral

    不确定您为什么尝试使用企业库将日志跟踪到文本文件。 ETW 是为此目的而推荐的高性能仪器。请参考文章https://social.technet.microsoft.com/wiki/contents/articles/30523.biztalk-server-2013-r2-instrumenting-an-orchestration-with-etw.aspx。

    【讨论】:

      猜你喜欢
      • 2015-12-23
      • 2012-02-09
      • 2012-09-20
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2023-03-14
      • 1970-01-01
      相关资源
      最近更新 更多