Link to home
Start Free TrialLog in
Avatar of José Perez
José PerezFlag for Chile

asked on

VS2013/ASP.Net/C# Deploy Oracle library from 32bit windows to 64bit windows server.

Hi,
I am little confused I think... I have an ASP.Net/C# solution (.Net framework 4.0) in a Windows 7 Pro 32bits. In this development computer I have Oracle Client 32 bits.

I need to deploy/publish my solution to a 64 bit windows 2008 R2 server with Oracle 11g Database.

I have published, a lot of times, using 'Any CPU' (in any combinations you may guess), but when accessing the site, it always display the error "The provider is not compatible with the version of Oracle Client"

Can someone hep on this matter?
Thanks.
Avatar of johnsone
johnsone
Flag of United States of America image

The simple way to remember it is that the bit version of the Oracle client has to match the bit version of the compiled application.  If you compiled a 32-bit application, then you need the 32-bit client.
Avatar of José Perez

ASKER

but I have compiled in a windows 32 bits with oracle client 32 bits also, but when publishing to the webserver (windows 2008 R2 64 bit version) it displays the "The provider is not compatible with the version of Oracle Client" error.
How can I check the oracle client version of the webserver? maybe with that I can compare against my oracle client.
If you build it with Any CPU, it will run as 64bits on windows 64bits by default. Build with 32bits option if you want to run it as 32bits anywhere.
If you've installed the client on the server, then you shouldn't need to deploy the DLL. Build your project as 64-bit, and then deploy the application sans Oracle DLL. The application should retrieve the 64-bit DLL from the GAC.
Kaufmed,
installed the client on the server? Didn't know that the client should be installed with the database.
anyway, what means 'sans' or is it a typo?

My development environment has the 32bit oracle client version, can I build it in 64, wouldn't be 'Any CPU' an option to do so? (sorry my confusion)
installed the client on the server? Didn't know that the client should be installed with the database.
Yes, the client has to be installed on the server, unless you use the Instant Client or the Managed Driver. But by "server" I do not mean the database server; rather I mean the server where your application is running (i.e. the web server).

Sans:  Without.
My development environment has the 32bit oracle client version installed, can I build it in 64bits anyway? wouldn't be 'Any CPU' an option to do so? (sorry my confusion)
ASKER CERTIFIED SOLUTION
Avatar of kaufmed
kaufmed
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
If you build with 32bits, Oracle client 32bits will be used.
If you build with 64bits, Oracle client 64bits will be used.
If you build with Any CPU, it depends on server setting. You can check what bits your application is running by checking task manager. Process that run in 32bits mode will have "*32" at the end of their image name (xxx.exe *32).