I have a ASP.NET legacy project to which ADFS authentication needs to be added. So I did the same but when I run the application, I keep getting this error:
Could not load file or assembly 'Microsoft.IdentityModel.Protocols.WsFederation, Version=5.2.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)
Here is my web.config
entry for the said assembly
<dependentAssembly>
<assemblyIdentity name="Microsoft.IdentityModel.Protocols.WsFederation" publicKeyToken="31bf3856ad364e35" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-5.3.0.0" newVersion="5.3.0.0" />
</dependentAssembly>
and my packages.json
entry
<package id="Microsoft.IdentityModel.Protocols.WsFederation" version="5.3.0" targetFramework="net452"/>
Why does the solution still search for version 5.2.0 when I refer to version 5.3.0?