I am trying to deploy an asp .net MVC app onto II7 and getting the following error:
Could not load file or assembly 'System.Web' or one of its dependencies. An attempt was made to load a program with an incorrect format.
The server has .net 3.5 SP1 and I tried including the dll in the website bin with no luck!
I noticed in the GAC on the server there are 2 System.Web 2.0 one with the processor architecture x86 and another with AMD64 (server is Intel XEON), could this be causing this error?
Thanks
SOLUTION: Change the build platform target to x64, doh!
There are supposed to be two in the GAC. One is 32 bit and the other is 64 bit. It sounds, from the error, that you are trying to load a 64-bit dll into a 32-bit process. What bitness is the program compiled as? What bitness is the server OS?