[Webinar] Streamline your web hosting managementRegister Today

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1410
  • Last Modified:

.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.
0
PugwashXP
Asked:
PugwashXP
  • 2
  • 2
  • 2
1 Solution
 
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
Never miss a deadline with monday.com

The revolutionary project management tool is here!   Plan visually with a single glance and make sure your projects get done.

 
PugwashXPAuthor Commented:
Now solved by ensuring same version of DLL on both platforms
0
 
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

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 2
  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now