64 Bit ASP.NET Project - Attempt to load Oracle client libraries threw BadImageFormat
I am getting a "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."
I have a main ASP.NET project which is 64 bit(set to Auto though) and another oracle database project 64 bit(set to Auto). I am getting the above error in "Connection.open()' in the oracle database project. I am using System.Data.Oracle client, the 64 bit version-2.0.50727.5420
Edit.I thought I would mention that I am using the latest Instant Client v 188.8.131.52 from the Oracle to run my program.
....I also tried the ODAC provider from Oracle. Same problem.
Also the oracle database project seems to run fine in x64 bit mode by itself without any problems. The way i verified that it was running in 64 bit mode was I just looked into task manager while the Oracle database project was executing and there was no *32 in the name of the project. All the frame references to this project are already 64 bit. It seems like the issue is the ASP.NET project which is at 3.5
Meanwhile below are things i did to try resolve the issue . It did start working randomly at some point but then something happened and it is not working anymore. I thought I fixed it but i cannot be sure if I did.->
1. Removed all 64 bit references from my projects. Added 64 bit dll references from Windows\Microsoft.Net\2.0*\.NETFRAMEWORK64.
2. Added 32 bit enabled support in my Application pool in IIS7.
3. When i run the project, I still get the& '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
Has anybody had any success with this?
Anybody have suggestions. I could make my whole project x86 but then I am using a 64 bit server processor..so it seems bad. Should I download Orcale Data access provider from Oracle and try it? Its supposed to be 64 bit.