-1

When I try to browse my project through IIS, I get the below error

"The provider is not compatible with the version of Oracle client"
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: Oracle.DataAccess.Client.OracleException: The provider is not compatible with the version of Oracle client

enter image description here

Please let me know what are the steps that i should perform to resolve this error. Thanks!

T.S.
  • 18,195
  • 11
  • 58
  • 78
  • Please provide error messages as text, not as an image. – Wernfried Domscheit Jan 17 '20 at 10:54
  • 2
    See https://stackoverflow.com/questions/659341/the-provider-is-not-compatible-with-the-version-of-oracle-client#25412992 – Wernfried Domscheit Jan 17 '20 at 10:54
  • +1. There's a lot of causes of this. If possible use the fully managed provider from nuget rather than the unmanaged provider. – Christian Shay Jan 17 '20 at 23:22
  • Does this answer your question? [The provider is not compatible with the version of Oracle client](https://stackoverflow.com/questions/659341/the-provider-is-not-compatible-with-the-version-of-oracle-client) – T.S. Jan 20 '20 at 22:22

3 Answers3

0

Assuming you have Oracle client installed and you have reference to the Oracle.DataAccess.dll in your project, check its version. Go to <your oracle client path>\odp.net folder and find there *.dll file with same name. Compare versions. Most likely issue is that DLL in your dir is different and does not match your installed Oracle Client. Use DLL that matches client.

And tell your boss to stop using Oracle client and use Oracle.ManagedDataAccess.dll

Now, there could be other issues causing this but this is minimum to check before moving further.

T.S.
  • 18,195
  • 11
  • 58
  • 78
0

In my case I got the same error message when migrating to the newer Oracle.ManagedDataAccess.dll and forgot to remove the existing Oracle.DataAccess.dll, resulting in a lot of ambiguity.

Everything worked once the older reference was removed.

Echo Train
  • 99
  • 11
-1

Last time I had this problem in an c# project I had to add Oracle.DataAccess.dll reference from my Oracle client directory.

ekochergin
  • 4,109
  • 2
  • 12
  • 19
  • Hi,Could you please let me know how can i do that as I m new to oracle. – Sahil Sehgal Jan 20 '20 at 07:06
  • Hi @SahilSehgal, 1. Find the directory your Oracle Client is installed, look for the Oracle.DataAccess.dll in that folder. Check the registry HKLM\Software\Oracle to get path to the client 2. In the Visual Studio, right click in the Project -> Add -> Reference, then browse to the file you founf on the previous step – ekochergin Jan 20 '20 at 08:30