. NET program error: BadImageFormatException .... If you are running in 64-bit mode with 32-bit Oracle client components installed

Source: Internet
Author: User

OracleClient Program to connect Oracle database, the following error is indicated:

The data connection is unsuccessful, check that the database is started when attempting to load an Oracle client when BadImageFormatException is raised. This issue occurs if you run in 64-bit mode with the 32-bit Oracle client component installed.

1.When you deploy IIS

Online search, there are various ways to try to install a 64-bit oracle11g client, or not. Later thought of whether IIS is a problem, before configuring IIS as if encountered a 32-bit 64-bit setting, after looking at the previous blog, the application pool has been set as follows

Set the application pool's advanced settings and default settings to enable the 32-bit application to true, which turns out to be false.

After the setup, there is no such error. Baidu found in the results did not mention this, may have met with the problem I have encountered different.

The exact principle of the error is unclear.

2. at the time of development

The main reason for the same problem is that VS2010 (other non-tested) Debugs are based on x86 (? Version issue? ), installing a 64-bit Oracle client segment may cause problems.

So it is necessary to unify the Oracle version, unified x86 can reduce the development problems, can affect performance? Don't feel it, the execution efficiency of the Code on a small project is the key.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.