Native environment: 64-bit Win7, 64-bit Oracle Desktop class installed
Server environment: 64-bit Windows Server 2008, 64-bit Oracle server-side
Problem: The native SQL Developer database is not a problem, the WinForm program connection is not a problem, but the Web program connection to Oracle failed, error: "The attempt to load the Oracle client library when the badimageformatexception thrown." This problem occurs if you are running in 64-bit mode with the 32-bit Oracle client component installed. “
Resolution process: To find the reason on the Internet, because the webDe.webServer.exe of VS is a 32-bit process, so there is not a 64-bit database, the solution is a lot, including the project's properties in the build option in the target platform: change to x86, The server in the Web item is changed to IIS does not use VS comes with the web deleloper ment service, modifies the PATH environment variable, etc., but none of it works.
The Final Solution: Install the 32-bit Oracle Client (Win32_11gr2_client.zip), but in this way the WinForm program is not connected to the database, you have to WinForm program's project properties in the build option to the target platform to change to x86, so it is all right.
About the 64-bit Win7 environment vs. connecting to Oracle Database