I\'ve just uploaded a Asp.Net Web Api 2.2 project to production server and I got the error stated in the title.
In my Web.config I already have this:
If you have an assembly in GAC with a different version, it will always be loaded, not the one from bin folder.
For me, from "Solution Explorer" I checked the ver of "System.Web.Http" in the project references, which was 5.2.3.0 so, in the web.config, I changed:
<bindingRedirect oldVersion="0.0.0.0-5.2.2.0" newVersion="5.2.2.0" />
to
<bindingRedirect oldVersion="0.0.0.0-5.2.2.0" newVersion="5.2.3.0" />
then build. It worked for me!