I recently installed "32-bit Oracle Data Access Components (ODAC) with Oracle Developer Tools for Visual Studio" on my computer (Windows 7, 64bit). Everything seems fine and I can develop and run my application in Visual Studio 2010 and IIS 7.
Now, when I deploy my application to the Server, it raises error:
Exception: System.TypeInitializationException: The type initializer for 'Oracle.DataAccess.Client.OracleCommand' threw an exception. ---> Oracle.DataAccess.Client.OracleException: The provider is not compatible with the version of Oracle client
Obviously I need to install ODAC on the server, too. My server is:
So. I downloaded the same installation from Oracle website (ODAC 11.2 Release 5 and Oracle Developer Tools for Visual Studio [11.2.0.3.20]) and installed it on the server. But still getting the same error.
PS: When I was installing, I chose Oracle Data Access Component for Oracle Client 11.2.0.3.20 in Oracle Universal Installer. hmmmm. Should I choose "Oracle Server" instead?
The first option (Oracle Data Access Component for Oracle Client 11.2.0.3.20) worked for me.