ESB工具包和企业库冲突

本文关键字:冲突 企业库 工具包 ESB | 更新日期: 2023-09-27 18:11:48

嗨,我需要使用企业库5来维护企业环境中的一致性。不幸的是,我们的机器里安装了商务用语。企业库似乎与ESB Toolkit发生了冲突。ESB Toolkit在机器中创建一个部分。配置企业库,版本为4.1。每次我运行我的应用程序,它读取配置从机器。配置,应用程序捕获异常。

为了解决这个问题,我添加了

<section name="enterpriseLibrary.ConfigurationSource" type="Microsoft.Practices.EnterpriseLibrary.Common.Configuration.ConfigurationSourceSection, Microsoft.Practices.EnterpriseLibrary.Common, Version=5.0.505.0,Culture=neutral, PublicKeyToken=31bf3856ad364e35"/> 

在我的网页。但是当我运行这个时,它显示

There is a duplicate 'enterpriseLibrary.ConfigurationSource' section defined 

因为它还是要进入机器。配置以读取enterpriseLibrary.ConfigurationSource。如何解决这个问题?

ESB工具包和企业库冲突

不要添加重复的部分,而是使用绑定重定向:

<dependentAssembly>
      <assemblyIdentity name="Microsoft.Practices.EnterpriseLibrary.Common" publicKeyToken="31BF3856AD364E35"/>      
      <bindingRedirect oldVersion="4.1.0.0" newVersion="5.0.505.0" />
</dependentAssembly>

我已经解决了这个问题,我的答案是在下面的链接ESB工具包和企业库与IIS Web冲突。配置

我所采取的解决问题的步骤可以在下面的微软论坛中找到。ESB Toolkit和企业库与IIS Web发生冲突。配置