Solving the System.Exception: System.Data.OracleClient requires Oracle client software version 8.1.7 or greater Mystery

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.

Exception Dialog

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”.

DefaultAppPool Properties

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.

Oracle Folder Permissions

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.

FolderProperiesSecurity 

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.

AccessControlSettings 

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!

Tags:

Debugging | Tips & Tricks | Incuity

Comments

8/4/2009 3:38:44 AM #

Alan

Thanks for this post.  This was exactly what I was looking for.

Alan United States |

Comments are closed

About Klaus Graefensteiner

I like the programming of machines.

Add to Google Reader or Homepage

LinkedIn FacebookTwitter View Klaus Graefensteiner's profile on Technorati
Klaus Graefensteiner

Klaus Graefensteiner
works as Developer In Test and is founder of the PowerShell Unit Testing Framework PSUnit. More...

Open Source Projects

PSUnit is a Unit Testing framwork for PowerShell. It is designed for simplicity and hosted by Codeplex.
BlogShell is The tool for lazy developers who like to automate the composition of blog content during the writing of a blog post. It is hosted by CodePlex.

Administration

About

Powered by:
BlogEngine.Net
Version: 1.6.1.0

License:
Creative Commons License

Copyright:
© Copyright 2012, Klaus Graefensteiner.

Disclaimer:
The opinions expressed herein are my own personal opinions and do not represent my employer's view in any way.

Theme design:
This blog theme was designed and is copyrighted 2012 by Klaus Graefensteiner

Rendertime:
Page rendered at 2/5/2012 10:46:47 PM (PST Pacific Standard Time UTC DST -7)