Today, I encountered a problem when connecting to Oracle. I installed the Oracle9.2 client on my machine. When I used the data access component in the asp.net application (calling System. data. oracleClient), the Program Reports "System. exception: System. data. oracleClient requires Oracle client software version 8.1.7 or greater "error. OracleConnection cannot be created, but the winfom client can access the database normally on the same machine. What's even more strange is that I can run my application normally when I deploy it on a machine with the Oracle 8.17 client installed.
After searching for half a day, I finally figured out the cause. When Oracle 9.2 runs on NTFS partitions, the ORACLE_HOME directory is invisible to some non-administrator groups, in windows server 2003, the account used by the asp.net application is netword service. Therefore, you cannot create an oracle connection. You only need to reset the permission of the ORACLE_HOME directory. The procedure is as follows:
1. Log on as an administrator;
2. Find the ORACLE_HOME folder (my name is c: \ oracle \ ora92), right-click it, select attribute-security, and select "Authenticated Users" in the group or user bar ", in the following permission list, remove the "read and run" permission, and then press the application. Re-select the "read and run" permission and click the application; select the "advanced" button under the permission box, confirm that the application following "Authenticated Users" is "this folder, subfolders, and files", and apply the permission changes to this folder according to OK;
3. restart the computer to make the permission settings take effect (this step is important );
4. log on and run the asp.net application to obtain data from the Oracle database.