Oracle.DataAccess.DLL issues

These are thus far, the most annoying messages i encountered within the week.

The type initializer for ‘Oracle.DataAccess.Client.OracleConnectionthrew an exception

System.Data.OracleClient requires Oracle client software version 8.1.7 or greater

and the error that causes this could be anything.

I’m not gonna go through the possibilities one by one, but here are a list of what you can check out. You’re probably already sure that you have the right client (needless to say, the right version as well) so we’ll get that out of the way.

  • Access to the Oracle Installation Folder Give Authenticated Users access. Restart if you can.
  • Get the right DLL How many versions of System.Data.OracleClient and Oracle.DataAccess do you have? Have you checked the GAC as well? This is not the best approach, but to make your life a little easier, use a File Reference for your libraries, rather than a GAC reference
  • Impersonate If you’re running it on WCF you need to add this attribute wherever your data access may be. Either in your SVC or in yet another class library

 

<OperationBehavior(Impersonation = ImpersonationOption.Required)>

 

  • Check your ports If you’re hosting on IIS, make sure you don’t have 2 ports having the same name. The WCF Service itself will work just fine. The SQL Server access in your Service, if any, will also work just fine.

Goodluck!

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s