Click here to Skip to main content
Click here to Skip to main content

Tagged as

Go to top

Attempt to load Oracle client libraries threw BadImageFormatException. This problem will occur when running in 64 bit mode with the 32 bit Oracle client components installed

, 19 Dec 2010
Rate this:
Please Sign up or sign in to vote.
ASP.NET website project hosted on IIS 7.5 running on Windows 2008 R2 is unable to connect to ‘Oracle’ database.

Problem Statement

"Attempt to load Oracle client libraries threw BadImageFormatException. This problem will occur when running in 64 bit mode with the 32 bit Oracle client components installed."

Reason 1#

There could be a possibility that Oracle Client 64 bit(drivers) is not installed properly on Windows 2008 r2. This improper installation of Oracle Client doesn't affect connectivity with Oracle for .NET Windows or Console application. It affects only Web based applications.

Solution

To check whether Oracle Client is installed properly or not, follow the following steps.

  1. Create one UDL file: Create one text file and name it as "conn.udl".
  2. Open conn.udl file. By opening that file, you will see a window as shown below:
  3. Select "Microsoft OLE DB Provider for Oracle" and click on Next button which will take you to the next tab "Connection".
  4. In this Connection tab, Give Database server name, User name and password and click on Test Connection. If all the Credentials are correct and required TNS entry is there in tnsnames.ora file, then it will give a connection successful message as shown below. If this message is coming, then Oracle Client installation is done properly.

Conclusion

Connectivity of ASP.NET With Oracle Client can be because of improper installation of Oracle Client on the server. So this is the basic Check we can do to verify it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

Share

About the Author

Shripad J

United States United States
No Biography provided

Comments and Discussions

 
GeneralMy vote of 1 PinmemberDeulis6-Jul-12 9:38 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

| Advertise | Privacy | Mobile
Web01 | 2.8.140916.1 | Last Updated 19 Dec 2010
Article Copyright 2010 by Shripad J
Everything else Copyright © CodeProject, 1999-2014
Terms of Service
Layout: fixed | fluid