Add the following configuration to the Web.config file in the <system.web> node section (assuming your application is running in .NET 4.5, the targetFramework attribute targetFramework set to 4.5):
<compilation targetFramework="4.5"> <assemblies> <add assembly="System.Net.Http, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" /> </assemblies> </compilation>
Also add below one at the root level in the <configuration> node:
<runtime> <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"> <dependentAssembly> <assemblyIdentity name="System.Net.Http" publicKeyToken="b03f5f7f11d50a3a" /> <bindingRedirect oldVersion="0.0.0.0-4.0.0.0" newVersion="4.0.0.0" /> </dependentAssembly> </assemblyBinding> </runtime>
This should solve your problem.
tugberk
source share