Windows Server 2003下安装了完整版的Oracle9i后,用C#程序连接Oracle时出现奇怪现象.
同样的代码编成console application后可以找Oracle的驱动.
但是当编译成Web 站点,部署到IIS6.0后提示"System.Data.OracleClient requires Oracle client software version 8.1.7 or greater"
后来google,找到一个帖子原来是权限问题.
http://social.msdn.microsoft.com/forums/zh-TW/233/thread/51e8076a-66be-45da-aeb3-da9b83394d70/
具体步骤:
* Log on to Windwos as a user with Administrator privileges.
以管理员身份登录windows
* Start Window Explorer and navigate to the ORACLE_HOME folder.
浏览到ORACLE_HOME目录
* Choose properties on the ORACLE_HOME folder.
选择属性
* Click the “Security” tab of the “Properties” window.
选择安全
* Click on “Authenticated Users” item in the “Name” list.
* Uncheck the “Read and Execute” box in the “Permissions” list under the “Allow” column.
* Re-check the “Read and Execute” box under the “Allow” column
设置Authenticated Users的权限为读和执行.
* 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.
重启电脑