Last post Jan 12, 2019 12:43 AM by Lannie
Jan 03, 2019 10:31 AM|Adwin Jha|LINK
Jan 03, 2019 12:04 PM|Adwin Jha|LINK
Could not load file or assembly 'Oracle.DataAccess' or one of its dependencies. An attempt was made to load a program with an incorrect format.
I got the answer.
I got the answer.
Jan 11, 2019 10:10 AM|Jenifer Jiang|LINK
Hi Adwin Jha,
If possible, could you please share your issue and your solution in details?
This will be helpful to those when meeting with the same problem.
Thank you in advance.
Jan 12, 2019 12:43 AM|Lannie|LINK
The Oracle ODP.NET must be installed on the web server. There is the unmanaged driver and client, and the managed driver with the client built in. Both use the same code within the application, but both have different configuration and import statements.
The unmanaged driver is bit specific. If the web app is compiled as 64-bit you must explicitly use the 64-bit unmanaged driver. The unmanaged driver also requires policies installed in the GAC. You can put your Oracle.DataAccess.dll in the /bin folder
and compile with local reference. Unmanaged driver also requires the Oracle Client to be installed. The version of the driver must match the version of the client installation to avoid errors.
The managed driver is ANY CPU compliant and comes with the Oracle client built into the driver. More convenient and portable. But Oracle 11g and earlier does not work when FIPS-140 is enabled in the web server security policy; that was fixed in Oracle
12c and 18c. And not all of the features in the unmanaged driver have been ported over to the newer managed driver, but at this point, a majority have.
So what driver are you using managed or unmanaged driver? If unmanaged what the bit-ness of your operating system, what bit-ness is your web app compiled in and what is the bit-ness of your Oracle.DataAccess.dll. Mismatch and you will get the error INCORRECT