by Klaus Graefensteiner
12. June 2009 10:46
Recently our Unit tests broke and we got an exception that indicated that we don’t have the right version of the Oracle client software. That was a lie. The client tools were there and I could successfully test the connection using the Oracle NetManager. Searching on the internet I found the solution. In our case our ASP.NET application pool didn’t have sufficient permissions to run the Oracle binaries. We needed to add the Network Service account to the group of users that could access the Oracle home folder and its content. Here are step-by-step instructions about how to solve this mystery.
Figure 1: Exception Dialog
Step 1: What user is running your ASP.NET application pool?
Find out in what application pool and under which user your application is running. In our case the application was running as “Network Service”.
Figure 2: DefaultAppPool Properties
Step 2: Find the Oracle Home folder
The path to the Oracle home folder is stored in the ORACLE_HOME environment variable. In our case it is “C:\Oracle”
Step 3: Add the user to the folders group
Use Explorer to navigate to the Oracle home folder and go to the folder properties. Go to the Security tab and add “Network Service” to the users that have permissions to access the folder and its content.
Figure 3: Oracle Properties
Step 4: Verify that the user has read and execute permissions
Go to the Security tab and add “Network Service” to the users that have permissions to access the folder and its content. Give “Network Service” read and execute permissions.
Figure 4: Folder permissions
Step 5: Propagate the permission change down stream
Click the Advanced button to get to the Advanced Security Settings for oracle. Make sure to check the “Replace permissions entries on all child objects with entries shown here that apply to child objects” checkbox. This will propagate the permissions to the child folders and their content.
Figure 5: Propagate permissions.
Step 6: IISReset
After the changes do an run IISReset from a command prompt and your problem should be gone
Ausblick
Good luck!