Deploy a Web project that has no problems with native, local server, but after deploying to a remote server, prompting a DLL to fail to load:
Server Error in '/' Application.
Could not load file or assembly ' Common.Component.Repository ' or one of its dependencies. An attempt is made to load a program with an incorrect format.
The first thing to be sure is that DLLs that the system claims cannot be loaded are real
Second, there is no problem from native or local servers, and it seems that the most likely cause is a problem with the remote server's environment. However, the remote server is installed. NET4.5.2, and running other Web projects is okay. The application pool corresponding to the Web project is also 4.0, excluding the reason for selecting 2.0.
Later, the developer of the Web project turned on 32-bit support on the application pool for IIS and resolved the problem. Originally, the remote server was a 64-bit win Server 2008.
The way to turn on 32-bit support is:
Select the application pool corresponding to the Web project, right-click, advanced Settings, Enable 32-bit application = True.
Similar articles on the web
Http://goxia.maytide.net/read.php/1541.htm
64-bit win2008 IIS does not turn on 32-bit support causes DLL to fail to load