WebService Ission ways Microsoft.practices.enterpriselibrary.common

发布于 2025-01-18 04:51:47 字数 3471 浏览 3 评论 0原文

我们正在迁移到新的 Biztalk 2016 环境,在 QA 环境中执行测试时,我发现我们的应用程序管理员安装了比我们的开发人员和开发人员工作站环境中存在的 Microsoft.Practices.EnterpriseLibrary.Common.dll 版本更新的版本。升级后的开发人员工作站和开发环境位于 4.1.0.0,而新的 QA 实例位于 5.0.414.0。这会在调用我们的 Web 服务之一时导致错误,而在较低环境中不会发生这种错误。这是 错误。

[A]Microsoft.Practices.EnterpriseLibrary.Common.Configuration.ConfigurationSourceSection cannot be cast to [B]Microsoft.Practices.EnterpriseLibrary.Common.Configuration.ConfigurationSourceSection. Type A originates from ''Microsoft.Practices.EnterpriseLibrary.Common, Version=5.0.414.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'' in the context ''Default'' at location ''C:\Windows\assembly\GAC_MSIL\Microsoft.Practices.EnterpriseLibrary.Common\5.0.414.0__31bf3856ad364e35\Microsoft.Practices.EnterpriseLibrary.Common.dll''. Type B originates from ''Microsoft.Practices.EnterpriseLibrary.Common, Version=5.0.505.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'' in the context ''Default'' at location ''C:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\radiantticket.mdm\d243f84e\660457a3\assembly\dl3\c57ec7c2\00590e12_5439cf01\Microsoft.Practices.EnterpriseLibrary.Common.dll''.

Server stack trace: 
   at System.ServiceModel.Channels.ServiceChannel.HandleReply(ProxyOperationRuntime operation, ProxyRpc& rpc)
   at System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs, TimeSpan timeout)
   at System.ServiceModel.Channels.ServiceChannelProxy.InvokeService(IMethodCallMessage methodCall, ProxyOperationRuntime operation)
   at System.ServiceModel.Channels.ServiceChannelProxy.Invoke(IMessage message)

Exception rethrown at [0]: 
   at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
   at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
   at IRadiantTicketsMDMService.LoadTicketTypeData(AMCHO ticketTypeRequest)
   at RadiantTicketsMDMServiceClient.LoadTicketTypeData(AMCHO ticketTypeRequest)

显然,Web 服务引用了该 dll 的 5.0.505.0 版本。我尝试了与下面类似的几个绑定重定向以获得下一个错误

    <dependentAssembly>
        <assemblyIdentity name="Microsoft.Practices.EnterpriseLibrary.Common" 
                      culture="neutral" publicKeyToken="31bf3856ad364e35" />
        <bindingRedirect oldVersion="0.0.0.0-5.0.505.0" newVersion="5.0.414.0" />
    </dependentAssembly>

和新错误

Server stack trace: 
   at System.ServiceModel.Channels.ServiceChannel.HandleReply(ProxyOperationRuntime operation, ProxyRpc& rpc)
   at System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs, TimeSpan timeout)
   at System.ServiceModel.Channels.ServiceChannelProxy.InvokeService(IMethodCallMessage methodCall, ProxyOperationRuntime operation)
   at System.ServiceModel.Channels.ServiceChannelProxy.Invoke(IMessage message)

Exception rethrown at [0]: 
   at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
   at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
   at IRadiantTicketsMDMService.LoadTicketTypeData(AMCHO ticketTypeRequest)
   at RadiantTicketsMDMServiceClient.LoadTicketTypeData(AMCHO ticketTypeRequest)

Microsoft.Practices.EnterpriseLibrary.Common

We are migrating to a new Biztalk 2016 environment, and while performing tests in our QA environment I discovered our app admins installed a newer version of the Microsoft.Practices.EnterpriseLibrary.Common.dll than exists on our Dev and Developer workstation environments. The upgraded developer Workstations and the Development environment are on 4.1.0.0, while the new QA instances are on 5.0.414.0. This causes an error when calling one of our webservices that doesn't happen in the lower environments. Here is the
error.

[A]Microsoft.Practices.EnterpriseLibrary.Common.Configuration.ConfigurationSourceSection cannot be cast to [B]Microsoft.Practices.EnterpriseLibrary.Common.Configuration.ConfigurationSourceSection. Type A originates from ''Microsoft.Practices.EnterpriseLibrary.Common, Version=5.0.414.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'' in the context ''Default'' at location ''C:\Windows\assembly\GAC_MSIL\Microsoft.Practices.EnterpriseLibrary.Common\5.0.414.0__31bf3856ad364e35\Microsoft.Practices.EnterpriseLibrary.Common.dll''. Type B originates from ''Microsoft.Practices.EnterpriseLibrary.Common, Version=5.0.505.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'' in the context ''Default'' at location ''C:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\radiantticket.mdm\d243f84e\660457a3\assembly\dl3\c57ec7c2\00590e12_5439cf01\Microsoft.Practices.EnterpriseLibrary.Common.dll''.

Server stack trace: 
   at System.ServiceModel.Channels.ServiceChannel.HandleReply(ProxyOperationRuntime operation, ProxyRpc& rpc)
   at System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs, TimeSpan timeout)
   at System.ServiceModel.Channels.ServiceChannelProxy.InvokeService(IMethodCallMessage methodCall, ProxyOperationRuntime operation)
   at System.ServiceModel.Channels.ServiceChannelProxy.Invoke(IMessage message)

Exception rethrown at [0]: 
   at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
   at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
   at IRadiantTicketsMDMService.LoadTicketTypeData(AMCHO ticketTypeRequest)
   at RadiantTicketsMDMServiceClient.LoadTicketTypeData(AMCHO ticketTypeRequest)

Apparently the web services had a reference to the 5.0.505.0 version of that dll. I've attempted the several binding redirects similar to the one below to get the next error

    <dependentAssembly>
        <assemblyIdentity name="Microsoft.Practices.EnterpriseLibrary.Common" 
                      culture="neutral" publicKeyToken="31bf3856ad364e35" />
        <bindingRedirect oldVersion="0.0.0.0-5.0.505.0" newVersion="5.0.414.0" />
    </dependentAssembly>

And the new error

Server stack trace: 
   at System.ServiceModel.Channels.ServiceChannel.HandleReply(ProxyOperationRuntime operation, ProxyRpc& rpc)
   at System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs, TimeSpan timeout)
   at System.ServiceModel.Channels.ServiceChannelProxy.InvokeService(IMethodCallMessage methodCall, ProxyOperationRuntime operation)
   at System.ServiceModel.Channels.ServiceChannelProxy.Invoke(IMessage message)

Exception rethrown at [0]: 
   at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
   at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
   at IRadiantTicketsMDMService.LoadTicketTypeData(AMCHO ticketTypeRequest)
   at RadiantTicketsMDMServiceClient.LoadTicketTypeData(AMCHO ticketTypeRequest)

Microsoft.Practices.EnterpriseLibrary.Common

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文