.NET Oracle exception

We are developing an application which runs as a windows service on a Windows 2008 64-bit server; the service runs under the SYSTEM account. The development environment is Visual Studio 2008 using .NET 2.0, on Windows XP 32-bit.

The application runs queries against a remote Oracle 11g database. We have installed "ODAC for Oracle Clients version 11.1.06.21" on the development system and Oracle Client 11.1.0.7.0 from "11107_w2k8_x64_production_client" on the Server installing only the default selection from Oracle Windows Interfaces 11.1.0.7.0. The DLL deployed by our application is Oracle.DataAccess.dll version 2.111.6.20. The installed DLL on the Windows 2008 server is in D:\app\Administrator\product\11.1.0\client_1\ODP.NET\bin\2.x and is Oracle.DataAccess.dll version 2.111.7.0.  There is only one Oracle Home on the Windows 2008 server.

Our windows service throws the following exception when run on the server:

Oracle.DataAccess.Client.OracleException The provider is not compatible with the version of Oracle client    at Oracle.DataAccess.Client.OracleInit.Initialize()
   at Oracle.DataAccess.Client.OracleConnection..cctor()
   
We also have a desktop based test program which is built in the same environment and with the same libraries. This application connects to the Oracle server and can run queries with no problems.
PugwashXPAsked:
Who is Participating?
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.

xoperatorCommented:
If you will follow every step on this article you will be able to connect th 11g version on oracle.

If will encounter any difficulties please don't hesitate to contact me.
0
PugwashXPAuthor Commented:
I'm afraid this misses the point of the question. All the above is done -the problem is the cross platform aspect and different versions of the DLL.
0
Cloud Class® Course: SQL Server Core 2016

This course will introduce you to SQL Server Core 2016, as well as teach you about SSMS, data tools, installation, server configuration, using Management Studio, and writing and executing queries.

PugwashXPAuthor Commented:
Now solved by ensuring same version of DLL on both platforms
0

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
x77Commented:
You are using 11.1.06.21 oracle version for develop and compile the code.
The server has instaled the version 11.1.0.7.0 and the error is from Oracle.DataAccess.dll version 2.111.7.0.  

The verification for vesions on net components is very strict. You can´nt use a inferior version on develop environment.

You can copy the Oracle.DataAccess.dll from 11.1.0.7.0 instalation to Net proyect directory and reference it.
You can need also copy the OraOpsX.dll  (x is the number for version 11, I use OraOps9.dll for version 9), Oracle.DataAccess.dll  references it.
Then compile and copy to destination directory.
0
x77Commented:
A more generic solution for version compatibility with dll´s is copy Oracle.DataAccess.dll and OraOpsX.dll  from the develop environment to executable directory.

When the program executes, it find the dll´s on executable directory then on GAC then on path.
The OraOpsX.dll  is forward compatible with client dll´s for same version (OraClient.dll).
0
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
Windows OS

From novice to tech pro — start learning today.