The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
I received this error today on a production Windows server — ASP.net 3.5, 64-bit system, IIS7, no third-party modules. The message was very generic, and fairly uninformative. Most puzzling of all is that it was happening in one the simplest of web apps (this server was being very lightly used, so there weren’t many apps to be affected). After a lot of trial and error, I finally got an error saying that offending assembly was System.ServiceModel.Web — I checked the public key in the config file against what was in the GAC, and it was a match; so was the version.
The problem turned out to be Windows Server 2008 needing a reboot after a batch of Windows updates — yet another problem solved by rebooting.