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.
LVL 2
José PerezAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

johnsoneSenior Oracle DBACommented:
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.
José PerezAuthor Commented:
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.
inxniCommented:
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.
Big Business Goals? Which KPIs Will Help You

The most successful MSPs rely on metrics – known as key performance indicators (KPIs) – for making informed decisions that help their businesses thrive, rather than just survive. This eBook provides an overview of the most important KPIs used by top MSPs.

käµfm³d 👽Commented:
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.
José PerezAuthor Commented:
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)
käµfm³d 👽Commented:
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.
José PerezAuthor Commented:
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)
käµfm³d 👽Commented:
No. Because you are using a component (on the server) that is built specifically as 64-bit, you have to build your application as 64-bit. "Any CPU" doesn't work even though it seems like it should.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
inxniCommented:
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).
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
.NET Programming

From novice to tech pro — start learning today.