The error of the 'Oracle provider which is not compatible with the version of Oracle' has been asked a couple of time on stackoverflow already, but seemingly all answers are either directed at x86 vs 64 bit or missing DLL's.
I'm not sure if this situation in unique, but...
I have a web project, win project and a project with some shared code. Now all 3 projects are set to 'Any CPU'. The win project can connect to Oracle, but the Web projects gives the error
Oracle.DataAccess.Client.OracleException: The provider is not compatible with the version of Oracle client
Both the web and win projects have the same DLL's in their bin folders.
Why can the one connect, but not the other? What else can I try? (I've also tried the other platform targets).
The error occurs when running:
OracleConnection oc = new OracleConnection(ConnectionString);
EDIT: The connection string are compiled from the Shared project, by reading credentials out of a SQL database, so the Win and web conn strings are the same. Here is a sample:
User Id=xxx;Password=xxx;
Data Source=(DESCRIPTION=
(ADDRESS=(PROTOCOL=TCP)
(HOST=172.xx.xx.xx)
(PORT=1521))
(CONNECT_DATA=(SID=xxx)));