Program defensively against ODAC instantclient

435 views Asked by At

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.

2

There are 2 answers

0
Grastveit On BEST ANSWER

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

3
tsells On

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/