C# 应用程序找不到程序集
我有一个ASP.NETMVC应用程序,它使用一个旧的服务Web服务增强,WSE。现在我尝试将此应用程序移动到Azure。当我尝试调用使用WSE的web服务时,出现了一个错误:C# 应用程序找不到程序集,c#,asp.net-mvc,azure,wse,C#,Asp.net Mvc,Azure,Wse,我有一个ASP.NETMVC应用程序,它使用一个旧的服务Web服务增强,WSE。现在我尝试将此应用程序移动到Azure。当我尝试调用使用WSE的web服务时,出现了一个错误: Configuration Error Description: An error occurred during the processing of a configuration file required to service this request. Please review the specific err
Configuration Error
Description: An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately.
Parser Error Message: The value of the property 'type' cannot be parsed. The error is: Could not load file or assembly 'Microsoft.Web.Services2, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
Source Error:
Line 62: <webServices>
Line 63: <soapExtensionTypes>
Line 64: <add type="Microsoft.Web.Services2.WebServicesExtension, Microsoft.Web.Services2, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" priority="1" group="High" />
Line 65: </soapExtensionTypes>
Line 66: </webServices>
因此,应用程序无法加载此程序集。我检查了bin文件夹-其中存在Microsoft.Web.Services2.dll文件。如何解决这个问题?也许是这样,但我不明白怎么做:
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="Castle.Core" publicKeyToken="407dd0808d44fbdc" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-65535.65535.65535.65535" newVersion="3.1.0.0" />
</dependentAssembly>
</assemblyBinding>
谢谢您是否使用了Microsoft.Web.Services2.dll程序集的正确版本?如何检查哪个版本已添加到我的项目或bin文件夹?请检查资源管理器属性页中dll文件的版本信息。版本为2.0.5050.0。我已经换了。现在,错误类似。无法加载文件或程序集“Microsoft.Web.Services2,版本=2.0.5050.0,…。请验证您的引用是否设置为“始终复制”,右键单击引用并选择“属性”。