Encounted the following error:
Could not load file or assembly ‘NameOfAssemblyGoesHere’ or one of its dependencies. An attempt was made to load a program with an incorrect format.
The problem happened when deploying a web application to a 64bit server where all the required DLL’s where marked as running only on a 32bit system. You can change this by setting the target platform to AnyCPU which will solve this issue. There is another workaround which is setting IIS compatability mode to 32bit, Open a command prompt and navigate to the %systemdrive%\Inetpub\AdminScripts directory. Type in the command cscript.exe adsutil.vbs set W3SVC/AppPools/Enable32BitAppOnWin64 “true”.