1

I'm trying to isolate the oracle-client to the application by xcopying the instantclient and setting environment-variables for ORACLE_HOME and PATH in global.asax.cs as described here and here, but still get [OracleException (0x80004005): The provider is not compatible with the version of Oracle client] when running on the server. Is there some way to programmatically check client and provider to give a more descriptive error-message?

EDIT This post has a start. It lists three causes for the error.

Community
  • 1
  • 1
Grastveit
  • 15,770
  • 3
  • 27
  • 36

2 Answers2

0

Use the managed oracle-client which is available now, then this question is irrelevant.

Grastveit
  • 15,770
  • 3
  • 27
  • 36
0

I did a blog post on this very thing. I used it in our DAL to prevent connections to non supported versions of Oracle.

https://tsells.wordpress.com/2011/05/12/oracle-11g-release-2-and-net-framework-4-0-and-version-checking/

tsells
  • 2,751
  • 1
  • 18
  • 20
  • Thanks for the reply, but I'm not using `DbProviderFactories`. I'm trying to xcopy-deploy the neccessary files, reference `Oracle.DataAccess.dll` and instanciate `OracleConnection` directly. – Grastveit Nov 08 '11 at 14:19
  • I don't think that is going to work. You have to register the providers for them to be available for the OS to use. – tsells Nov 08 '11 at 17:56
  • Hm, maybe that is the problem then. However the [documentation](http://download.oracle.com/docs/html/E15167_01/InstallODP.htm) says 'Oracle.DataAccess.dll searches for dependent unmanaged DLLs' in the executable folder first. Aren't those files the provider? – Grastveit Nov 09 '11 at 00:02