views:

840

answers:

2

My client have an x64 server where he installed both x32 and x64 versions of Oracle Client. After he installed my web application and tried to run it he got "An attempt was made to load the program with an incorrect format (HRESULT 0x8007000B)" exception about Oracle.DataAccess.dll

His IIS configured to 64 bit.

I event asked him to add << assemblyBinding>> redirect with processorArchitecture="amd64" attribute on Oracle.DataAccess.dll in web config, but it didn't help.

How can I force my app/his IIS/his server to select the right version of Oracle Client?

A: 

Have you tried setting the PATH environment variable for the IIS process to only include the 64 bit binaries?

This is not a pleasant solution in many respects (especially for services and hosted runtimes such as IIS) but if it works it will give you some options to consider.

ShuggyCoUk
+1  A: 

Apparently Oracle installers for 32bit and 64 bits don't recognize each other, so if you first install 32bit version and then install 64bit version, the 64 bit version will be installed by default to the same directory as 32 bit version. And this is not good. The solution was to remove both clients, and then install 32 bit into one directory and 64bit to another directory.

Alex Reitbort