System.Data.OracleClient requires Oracle client software version 8.1.7(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表单,放到程序的目录下,就一个按钮,打开连接,try..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 下运行.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
目录的内容对机器上的 Authenticated Users 不可见;这会在 System.Data.OracleClient
使用 Authenticated User 权限与来自 ASP.NET 的 Oracle Connectivity 软件进行通信时导致错误.
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 主目录.
To fix the problem you have to give the Authenticated Users group privilege to the Oracle Home directory.
- 以具有管理员权限的用户身份登录 Windows.
- 启动 Windows 资源管理器并导航到
ORACLE_HOME
文件夹. - 选择
ORACLE_HOME
文件夹中的属性. - 点击属性窗口的安全标签.
- 点击名称列表中的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.
这篇关于System.Data.OracleClient 需要 Oracle 客户端软件版本 8.1.7的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:System.Data.OracleClient 需要 Oracle 客户端软件版本 8.1.7
基础教程推荐
- 在 VB.NET 中更新 SQL Server DateTime 列 2021-01-01
- SQL Server 2016更改对象所有者 2022-01-01
- ERROR 2006 (HY000): MySQL 服务器已经消失 2021-01-01
- Sql Server 字符串到日期的转换 2021-01-01
- SQL Server:只有 GROUP BY 中的最后一个条目 2021-01-01
- 使用pyodbc“不安全"的Python多处理和数据库访问? 2022-01-01
- 如何在 SQL Server 的嵌套过程中处理事务? 2021-01-01
- SQL Server 中单行 MERGE/upsert 的语法 2021-01-01
- 无法在 ubuntu 中启动 mysql 服务器 2021-01-01
- 将数据从 MS SQL 迁移到 PostgreSQL? 2022-01-01