System.Data.OracleClient需要Oracle客户端软件版本8.1.7

问题描述:

我有一个使用Vb.net9在Vista上开发的网站.它与Oracle建立了连接.对于连接,我使用System.Data.OracleClient.它在我的机器和测试服务器上都可以正常工作,但在生产服务器上却无法正常工作.我们在服务器上安装了Oracle Client 11.错误是System.Data.OracleClient需要Oracle客户端软件版本8.1.7

I have a web site that I developed on Vista using Vb.net9. It makes a connection to Oracle. for the connection I use System.Data.OracleClient. It works fine on my machine, and our test server, but it does not work on the production server. We installed the Oracle Client 11 on the server. The error is System.Data.OracleClient requires Oracle client software version 8.1.7

我们已经尝试过制作一个控制台应用程序,用于打开连接,连接运行正常,打开,显示消息,并且一切正常.

We've tried, making a console app that opens the connection, connection runs fine, opens, displays a message and all is well there.

然后我们制作一个简单的Web表单,将其放在程序目录中,只需一个按钮,打开连接,尝试..catch,捕获错误,同样的错误.

Then we make a simple web form, put it in the directory of the program, just a button, opens the connection, try..catch, grabs error, same error.

控制台应用程序在iwam下运行的Administrator(网站)下运行. iwam可能有不同的路径吗?

The console app was running under an Administrator, web site running under iwam. Is it possible that iwam has a different path?

我已经多次遇到此错误:

I've run into this error dozens of times:

原因

在带有NTFS的Windows上安装Oracle客户端时,未正确设置安全权限.结果是ORACLE_HOME目录的内容对计算机上的已认证用户"不可见; System.Data.OracleClient使用身份验证的用户权限从ASP.NET与Oracle Connectivity Software通信时,这会导致错误.

Security permissions were not properly set when the Oracle client was installed on Windows with NTFS. The result of this is that content of the ORACLE_HOME directory is not visible to Authenticated Users on the machine; this causes an error while the System.Data.OracleClient is communicating with the Oracle Connectivity software from ASP.NET using Authenticated User privileges.

解决方案

要解决此问题,您必须将Authenticated Users组的特权授予Oracle Home目录.

To fix the problem you have to give the Authenticated Users group privilege to the Oracle Home directory.

  • 以具有管理员特权的用户身份登录Windows.
  • 启动Windows资源管理器并导航到ORACLE_HOME文件夹.
  • 选择ORACLE_HOME文件夹上的属性.
  • 点击属性"窗口中的安全性"标签.
  • 单击"名称"列表中的"授权用户"项.
  • Allow 列下的 Permissions 列表中取消选中 Read and Execute 框.
  • 重新选中"允许"列下的"读取并执行"框.
  • 单击高级按钮,然后在权限条目中验证是否列出了具有权限的 Authenticated Users : Read&执行,然后应用于:此文件夹,子文件夹和文件.如果不是,请编辑该行,并确保将应用于下拉列表框设置为此文件夹,子文件夹和文件.这应该已经正确设置,但是您必须进行验证.
  • 单击确定"按钮,直到关闭所有安全属性窗口.光标可能会显示沙漏几秒钟,因为它会将您刚刚更改的权限应用于所有子文件夹和文件.
  • 重新启动,以确保更改已生效.
  • Log on to Windows as a user with Administrator privileges.
  • Start Windows Explorer and navigate to the ORACLE_HOME folder.
  • Choose properties on the ORACLE_HOME folder.
  • Click the Security tab of the Properties window.
  • Click on Authenticated Users item in the Name list.
  • Un-check the Read and Execute box in the Permissions list under the Allow column.
  • Re-check the Read and Execute box under the Allow column.
  • Click the Advanced button and in the Permission Entries verify that Authenticated Users are listed with permission: Read & Execute, and Apply To: This folder, subfolders and files. If not, edit that line and make sure that Apply To drop-down box is set to This folder, subfolders and files. This should already be set properly but it is important that you verify it.
  • Click the OK button until you close out all of the security properties windows. The cursor may present the hour glass for a few seconds as it applies the permissions you just changed to all subfolders and files.
  • Reboot, to assure that the changes have taken effect.

再次尝试您的应用程序.

Try your application again.