开发者

Deploy ODP.Net 1.x with Oracle Instant Client?

开发者 https://www.devze.com 2023-02-19 10:01 出处:网络
I have an issue with adjusting my application to use separated Oracle Install Client/ODP.Net configuration.

I have an issue with adjusting my application to use separated Oracle Install Client/ODP.Net configuration.

I've tried to follow steps mentioned in: http://alderprogs.blogspot.com/2009/04/deploying-odpnet-with-oracle-instant.html but I keep receiving dreaded "The provider is not compatible with the version of Oracle client" errors.

The above example mentions ODP.Net 2.x deployment, and I have to use 1.x.

I'm not sure if 1.x can work with Instant Client.

Does anyone else had experience with such par开发者_StackOverflowticular issue?

P.S. I hope there is a special place in hell for Oracle people who made the ODP.Net such a PITA.


This is probably because Oracle.DataAccess is already registred in the GAC.

The CLR loads this version instead of the local one (this will most likely happen even if the GAC is referencing a newer version of Oracle.DataAccess due to Publisher Policy-files also installed in the GAC).

When the assembly is located in the GAC the Instant Client dll's (located in your App-folder) is never used and instead Oracle.DataAccess will look for a reguler Oracle Client-installation. This may cause "The provider is not compatible with the version of Oracle client".

If this is the case you need to uninstall Oracle.DataAccess from GAC:

gacutil /u Oracle.DataAccess

You will also need to uninstall the Policy-files in the same way.

0

精彩评论

暂无评论...
验证码 换一张
取 消