使用oracle.dataaccess.dll错误 [英] Error using oracle.dataaccess.dll

查看:570
本文介绍了使用oracle.dataaccess.dll错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个web应用程序,它使用Oracle.DataAccess.dll与Oracle数据库进行通信。 Web应用程序部署在32位Windows系统的工程,但不能在Windows Server 2008 64位。我安装10204_vista_win2k8_x64_production_db包,引用从项目中已安装的DLL(2.102.4.0版),但我得到以下错误:

I have a web application which uses Oracle.DataAccess.dll to communicate with an Oracle db. The web application deployed on 32 bit windows system works but not on windows server 2008 64 bit. I installed 10204_vista_win2k8_x64_production_db package, referenced the installed dll (version 2.102.4.0) from the project but I get the following error:

无法加载文件或程序集Oracle.DataAccess,版本= 2.102.4.0,文化=中性公钥= 89b483f429c47342或它的某一个依赖。该系统找不到指定的文件。

Could not load file or assembly 'Oracle.DataAccess, Version=2.102.4.0, Culture=neutral, PublicKeyToken=89b483f429c47342' or one of its dependencies. The system cannot find the file specified.

推荐答案

我也一样。该Oracle.DataAccess组件不能在64位模式下运行。

Same here. The Oracle.DataAccess assembly doesn't run in 64 bit mode.

您应该设置的应用程序池为您的网站,以32位模式(进入应用程序池的高级设置,设置允许32位应用程序以真)

You should set the application pool for your site to 32 bit mode (go to the application pool's Advanced Settings and set Allow 32 Bit Applications to "True")

如果还是不行,请确保您的Oracle目录(包含所有的Oracle DLL文件的目录)是在你的系统路径。如果你忘了,你得到一个关于没有找到Oracle.DataAccess一样神秘的错误。

If that doesn't work, make sure your Oracle directory (the directory containing all the Oracle dlls) is in your system path. If you forget that, you get the same cryptic error about not finding Oracle.DataAccess.

修改

安装Oracle客户端可以是一个重大的痛苦。使用 Oracle即时客户端比安装完整的客户端比较容易,所以这是我平时做的:

Installing the Oracle client can be a major pain. Using the Oracle Instant Client is somewhat easier than installing the full client, so this is what I usually do:

  1. 下载 Oracle即时客户端
  2. 解压缩档案在C:\ ORACLE(任何其他目录都可以)
  3. 打开一个命令提示符作为管理员
  4. 键入 CD \ ORACLE
  5. 键入配置odp.net20 MYHOME
  6. 在我的电脑,高级系统设置,环境变量右键单击以及C补充:\ oracle目录添加到系统路径
  7. 从C上Oracle.DataAccess.dll文件复制:\ ORACLE \ odp.net \ BIN \ 2.X到应用程序的bin文件夹
  8. (optonally)编辑C:\ ORACLE \ tnsnames.ora文件
  1. Download the Oracle Instant Client
  2. Unzip the archive in c:\oracle (any other directory will do)
  3. Open a command prompt as administrator
  4. type cd \oracle
  5. type configure odp.net20 myhome
  6. Right-click on "My Computer", "Advanced System Settings", "Environment Variables" and add the C:\oracle directory to the system path
  7. Copy the Oracle.DataAccess.dll file from c:\oracle\odp.net\bin\2.x to your application's bin folder
  8. (optonally) edit your c:\oracle\tnsnames.ora file

这篇关于使用oracle.dataaccess.dll错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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