【发布时间】:2013-04-26 00:05:39
【问题描述】:
您好,我需要使用企业库 5 来保持企业环境中的全面一致性。不幸的是,我们的机器上安装了 biz talk。企业库似乎与 ESB Toolkit 发生冲突。 ESB Toolkit 在 machine.config 中为 4.1 版的企业库创建一个部分。每次我运行我的应用程序时,它都会从 machine.config 中读取配置,并且应用程序会捕获异常。
为了解决这个问题,我加入了
<section name="enterpriseLibrary.ConfigurationSource" type="Microsoft.Practices.EnterpriseLibrary.Common.Configuration.ConfigurationSourceSection, Microsoft.Practices.EnterpriseLibrary.Common, Version=5.0.505.0,Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
在我的 web.config 文件中,但是当我运行它时,它说
There is a duplicate 'enterpriseLibrary.ConfigurationSource' section defined
因为它仍然会去 machine.config 来读取 enterpriseLibrary.ConfigurationSource。我该如何解决这个问题?
【问题讨论】:
标签: c# web-config enterprise-library esb-toolkit-2.0