我有一个ASP.NET MVC应用程序,它使用一个旧服务(Web Services Enhancements,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 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>
由于