Badimageformatexception is thrown when you try to load the Oracle client library. If the 32-bit Oracle client component is installed

Source: Internet
Author: User

Badimageformatexception is thrown when you try to load the Oracle client library. This problem occurs when the 32-bit Oracle client component is installed in 64-Bit mode.

This exception occurs when a. NET application running on a 64-bit platform tries to call a DLL that does not support 64-bit execution. If the application is generated in the "any CPU" mode without a specific platform, it runs in the 64-Bit mode based on the operating system, which causes this problem. To solve this problem, you can compile the program on the x86 solution platform to enable the program to run in 32-Bit mode, or run the program on the wow64 subsystem of the 64-bit operating system, and allow the use of 32-bit DLL.

 

1.     Right-click the solution to be run-right-click Properties, select generate-platform, and change to x86. (Both vs2008 and vs2010 are suitable for looking at the problem from another angle. Can we modify the startup project -- attribute -- Target Platform specified platform of VS solution? Change to x86

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.