Friday, October 30, 2009 by Nandu
Working with 64 bit environment is a pain. Most of the drivers fail to work. After having a bad experience with Microsoft Jet driver, now it was Oracle.
The code I am working on makes use of ODP.NET 10g. There is a reference to the Oracle.DataAccess.dll and the “Copy Local” property in the references is set to true. When I ran this application in Windows XP (32 bit) things worked fine.
When I deployed the published code on the Windows 2008 64 bit environment, I got the following error message:
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.
On looking further I got to know all I had to do was remove the dll from the bin older so that the 64 bit version of the assembly could be used.
One issue resolved, some more to fix.
Alternatively, I haven’t tried this, but I suppose if I set the Application Pool in IIS 7 to 32 bit, this would still work.