ESB Toolkit and Enterprise Library collision

蹲街弑〆低调 提交于 2019-12-23 05:50:53

问题


Hi i need to use enterprise library 5 to maintain consistency across the board in the enterprise environment. Unfortunately we have got biz talk installed in our machines. It seems that enterprise library collides with ESB Toolkit. ESB Toolkit creates a section in machine.config for enterprise library which is version 4.1. Every time i run my application it reads the config from machine.config and the application catches the exception.

To solve this i included

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

in my web.config file but when i run this it says

There is a duplicate 'enterpriseLibrary.ConfigurationSource' section defined 

because its still going to machine.config to read the enterpriseLibrary.ConfigurationSource. How can i resolve this issue?


回答1:


Instead of adding a duplicate section, do a binding redirect:

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



回答2:


I have solved this issue and my answer is at the following link ESB Toolkit and Enterprise Library collision with IIS Web.Config

And the troubleshooting steps I have taken to come to the answer is available at the following Microsoft forum. ESB Toolkit and Enterprise Library collision with IIS Web.Config



来源:https://stackoverflow.com/questions/16327516/esb-toolkit-and-enterprise-library-collision

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!