I have an ASP.NET website application focused on the .NET 4.0 platform and the application provides some web services using WSE 3.0 (Microsoft.Web.Services3.dll) for security. I get a SoapHeaderException: SOAP header. Security was not understood when using the service. I have a very similar setup that works fine when the application targets .NET 2.0, and I compared the configuration files without any differences.
Using Reflector I can see that Microsoft.Web.Services3.dll is referencing System.Web.Services, Version = 2.0.0.0 , but when I check the assembly binding using Fuslogvw.exe (assembly binding viewer) I see the version redirect found in the config framework: 2.0.0.0 redirected to 4.0.0.0 . I checked the various configuration files at the machine level, and there is no explicit link to the redirection, so I am sure that the redirection is related to the Microsoft publisher assembly policy . I tried using publisherPolicy Elementto prevent this redirection using the configuration below, but it doesn't seem to be affected. I also tried moving the publisherPolicy element outside of the dependAssembly element so that it applies in general, but that didn't help either.
Any ideas what I'm doing wrong or alternative ways to force the assembly are tied to a specific version of the assembly?
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="System.Web.Services, Version=2.0.0.0" publicKeyToken="b03f5f7f11d50a3a" culture="neutral"/>
<publisherPolicy apply="no" />
</dependentAssembly>
</assemblyBinding>
</runtime>
source
share