I am getting this error while on of my .Net
application are trying to make a connection to oracle database.
The error says that This problem will
As it was pointed out in the comments, System.Data.OracleClient is deprecated. There is little reason to start using it so late in the game.
Also as pointed out in the comments (I've marked this as community wiki in observence), there is now a managed provider as part of the 12c and later versions of the odp.net package. This provider does NOT require any unmanaged dlls so this should be a non issue in that case.
If you would prefer to use the old unmanaged Oracle.DataAccess provider from oracle, the simplest solution is to set the "DllPath" configuration variable:
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<oracle.dataaccess.client>
<add key="DllPath" value="C:\oracle\bin"/>
</oracle.dataaccess.client>
</configuration>
See "Search Order for Unmanaged DLLs" in http://docs.oracle.com/database/121/ODPNT/InstallODP.htm for more information
this solution work for me ,
To revise IIS
Select Application Pools.
Clic in ASP .NET V4.0 Classic.
Select Advanced Settings.
In General, option Enable 32-Bit Applications, default is false. Select TRUE.
Refresh and check site.
Comment:
Platform: Windows Server 2012 Standart- 64Bit - IIS 8
I had this error in my DNN application installed on Windows 2012 R2. It's using some 32 bit dll and only Oracle.DataAccess.dll x32 was working. My solution is:
I got this issue for a console Application.
In my case i just changed the Platform Target to "Any CPU" which you can see when you right click your solution and click on properties , you will find a Tab "Build" click on it, you will see "Platform target:" change it to "Any CPU", which will solve your issue
I had the same issue on a Windows 10 PC. I copied the project from my old computer to the new one, both 64 bits, and I installed the Oracle Client 64 bit on the new machine. I got the same error message, but after trying many solutions to no effect, what actually worked for me was this: In your Visual Studio (mine is 2017) go to Tools > Options > Projects and Solutions > Web Projects
On that page, check the option that says: Use the 64 bit version of IIS Express for Websites and Projects
I developed desktop application using C#.net with 2.0 framework along with system.data.oracleclient for connecting oracle db and I was facing similar error message ,"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."
following solutions were applied
now, it work because application is set for 32bit and oracle 32bit client installed over Win2012 R2 server, hopefully will work for you.