by Kevin Goff
20. May 2008 00:15
Running an x64 (64 bit) version of Windows with Oracle ODP client can be a challenge to setup. If you need to run an x64 (64 bit) version of Windows with the Oracle ODP.net this is for you.
[NOTE: THIS INCLUDES INSTRUCTIONS FOR WORKING IN 32bit MODE ONLY]
IIS/ASP.net
If you need to run an x64 Windows machine with ASP.net using Oracle's ODP.net client you will want to run IIS in x86 (32 bit) mode. The reason for this is because, as of the writing of this article, Oracle has not yet published a production (non beta) release of the ODP.net client that runs in x64 mode. You can switch IIS to x86 mode using the instructions found here. You will also want to review this article if you are using the Microsoft Enterprise Library.
Console, Windows Forms, or Windows Services
.net will try and run in x64 bit mode by default. To force x86 mode you will need to switch the platform target from the default value of <Any CPU> to <x86> and recompile.
Another issue to be aware of is that any application that tries to make use of the either version of the Oracle client (x86 or x64) must NOT be installed in a path that contains parenthesis. That means anything installed under c:\program files (x86)\ will not work. Make sure to install these applications under some other directory such as c:\oraclestuff\.
References:
Oracle ODP Client installation for 32 bit mode usage
Oracle ODP Client installation for 64 bit mode usage
Working with x64 and the Microsoft Enterprise Library
Find other issues w/ ODP and x64? Shoot me a note using submit feedback
Error messages and meanings:
- [BadImageFormatException: An attempt was made to load a program with an incorrect format.
- --Translation: you are trying to use a 32 bit ODP client while in 64 bit mode.