Failed to load file or assembly "oracle.dataaccess" or one of its dependencies. Attempting to load an improperly formatted program

Source: Internet
Author: User

. net:microsoft Visual Studio +. NET Framework 3.5

Operating system: windows2008 R2 64-bit operating system

Oracle database: 32-bit version of Odp.net 2.0

Fluroinefx:fluorinefx v1.0.0.15 (click to download)

FluorineFX application, published to IIS, reported: "Failed to load file or assembly" oracle.dataaccess "or one of its dependencies. An attempt was made to load a program that is not properly formatted. “。

This Oracle.DataAccess.dll copy of the. NET Access Oralcle database that is provided by Oracle in the project is not set to True (the reference is found in the project reference, and this "Copy local" is in the right-click property). All releases, It is not automatically copied to the Bin directory. This could result in an error that failed to load. As shown in the following:

Either modify the Reference property in the project or copy the DLL directly to the bin directory that is published on the server. My IIS server is 64-bit, and my odp.net is 32. So the corresponding Oracle.DataAccess.dll should also be 32-bit, which involves the configuration of IIS. The Oracle.DataAccess.dll is 32-bit and the system is 64-bit.

One of the settings in IIS is as follows: First look at which application pool the project uses:

Then go to the application pool to configure, first find the test application pool

Right-click Advanced Settings

Set enable 32-bit application to True

OK, everything is fine.

Note that I'm here to test the application pool in the basic settings inside the managed pipeline mode is selected by the classic

Failed to load file or assembly "oracle.dataaccess" or one of its dependencies. Attempting to load an improperly formatted program

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.