Oracle数据访问版本问题 [英] Oracle data access version issue

查看:389
本文介绍了Oracle数据访问版本问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我连接到Oracle使用ODP.NET。我的测试服务器,甲骨文有两个版本的安装(v4和V2)。我有其连接到一个版本(V4)和我的应用程序连接到其它(v2)的第三方应用程序。

I am connecting to oracle using ODP.NET. My testing server has two versions of Oracle(v4 and v2) installed. I have a third party application which is connected to one version(v4) and my application is connected to the other(v2).

当我运行使用Visual Studio的我的应用程序,它完全没有任何错误。但是,当我发布和运行从IIS它抛出错误说

When I run my application using a Visual studio, it works perfectly without any errors. But, when I publish and run from IIS it throws error saying

无法加载文件或程序集Oracle.DataAccess,版本= 4.121.1.0,
  文化=中性公钥= 89b483f429c47342'或之一其
  依赖。找到的程序集清单定义不
  匹配程​​序集引用。 (异常来自HRESULT:0x80131040)

Could not load file or assembly 'Oracle.DataAccess, Version=4.121.1.0, Culture=neutral, PublicKeyToken=89b483f429c47342' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)

如果我把4.1版本的Oracle DLL将开始展现出不同的误差

If I place the Oracle dll with version 4.1 it will start to show a different error

无法加载文件或程序集Oracle.DataAccess或之一其
  依赖。一个试图加载程序使用不正确的
  格式。

Could not load file or assembly 'Oracle.DataAccess' or one of its dependencies. An attempt was made to load a program with an incorrect format.

如何在没有从机器中取出(卸载)的Oracle解决这个问题?

How to fix this issue without removing(uninstalling) oracle from the machine?

注:在当前情况下,Oracle版本无法从服务器上删除。因此,这两个版本将继续安装。

NOTE: In current scenario, oracle versions cannot be removed from the server. So, both version will remain installed.

推荐答案

第一条错误消息告诉您没有安装Oracle客户数据的正确版本。它一直在寻找 Oracle.DataAccess,版本= 4.121.1.0 ,但它不存在。

The first error message tells you didn't install the proper version of the Oracle Data client. It was looking for Oracle.DataAccess, Version=4.121.1.0 but it wasn't there.

第二条错误信息告诉你它的存在了,但它会尝试加载不同的体系结构(即:你安装了32位,而这个过程是64位或其他方式)

The second error message tells you it is there now, but it tries to load a different architecture (that is: you installed 32-bit while the process is 64-bit or the other way around).

有几种修复:


  1. 安装的客户端工具的正确版本,包括正确的位的版本。

  2. 设置IIS在另一个位模式下运行(因此恢复到了32位,如果这个过程是64位了)。

  3. (preferred)使用Oracle数据客户端的架构独立版本:的 Oracle管理

  1. Install the right version of the client tools, including the right 'bits' version.
  2. Set IIS to run in another bit mode (so revert to 32 bits if the process is 64 bits now).
  3. (Preferred) Use the architecture independent version of the Oracle data client: Oracle Managed.

这篇关于Oracle数据访问版本问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆