A BadImageFormatException was thrown when trying to load the Oracle client library. This issue occurs when running in 64-bit mode with 32-bit Oracle client components installed

Solution:

Reason: The website generated by VS2013, there is a place to call the 32-bit DLL file, and put it on the 64-bit server to prompt the error "System.BadImageFormatException: Attempt to load a program with an incorrect format. (Exception from HRESULT: 0x8007000B)", see After looking at the solutions on the Internet, many places say that when compiling:

Project right-click properties -> Project Designer -> Build -> Platform -> Change 'Default Settings (Any CPU)' to x86. Because 'any CPU' program will run as 64-bit on a 64-bit machine, and a 64-bit program cannot load a 32-bit dll;

It did not solve the problem. Later, it was found that in the application pool corresponding to the website in IIS - the default setting of the application pool - enabling 32-bit applications was changed to True, and the problem was solved.

 

 

Reprinted from: https://blog.csdn.net/changjian1444/article/details/32907587

 

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325987172&siteId=291194637