Diagnostics: x64, ODP.net and "Unable to find ... Data Provider"

by Kevin Goff 19. October 2009 21:53

Diagnostics: x64, ODP.net and "Unable to find ... Data Provider"

I came across a problem today on our x64 (extended 64 bit) servers when troubleshooting an Oracle installation. We completed the installation of the ODP.net Oracle client and setup as we normally do on our x86 machines but this time there was a problem: we weren't connecting to Oracle. I started diagnosing the problem using the typical techniques -- google the exception text. But -- no joy. There only 3 other articles that contained similar texts but none of them seemed to be pointing towards Oracle or x64. Now I knew I was in for some fun diagnosing.

Before I go to much further let me summarize the problem. First of all the error message, "Unable to find the requested .Net Framework Data Provider. It may not be installed.".

Next is the environment:

  • Running x64 machines in IIS 32bit mode.
  • We were using VS 2005, .net 2.0 runtime
  • ODP.net 10
  • Microsoft Enterprise Library - January 2006 version.

 

After trying several different typical fixes I realized I needed to start from scratch -- create a basic web app that hits oracle through ODP and see if it works. DING! The test project worked fine. So now what? Oracle works, IIS works, that pretty much leaves the Enterprise Library. After digging in to the guts of the how the Enterprise Library works I discovered that the installation process of the Oracle ODP client requires a little snip added to the machine.config. Further investigation found that Oracle did update the machine.config of the Framework64 directory but not the 32bit directory. AHA!

The solution: edit the machine.config (Located at C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\CONFIG\machine.config) and add the missing piece. The Enterprise Library needs this piece to function. (the piece that was missing for our configuration is listed in blue below)

 

C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\CONFIG\machine.config
  1. ...
  2. <system.data>
  3.   <DbProviderFactories>
  4.     <add name="Odbc Data Provider" invariant="System.Data.Odbc" description=".Net Framework Data Provider for Odbc" type="System.Data.Odbc.OdbcFactory, System.Data, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
  5.     <add name="OleDb Data Provider" invariant="System.Data.OleDb" description=".Net Framework Data Provider for OleDb" type="System.Data.OleDb.OleDbFactory, System.Data, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
  6.     <add name="OracleClient Data Provider" invariant="System.Data.OracleClient" description=".Net Framework Data Provider for Oracle" type="System.Data.OracleClient.OracleClientFactory, System.Data.OracleClient, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
  7.     <add name="SqlClient Data Provider" invariant="System.Data.SqlClient" description=".Net Framework Data Provider for SqlServer" type="System.Data.SqlClient.SqlClientFactory, System.Data, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
  8.     <add name="SQL Server CE Data Provider" invariant="Microsoft.SqlServerCe.Client" description=".NET Framework Data Provider for Microsoft SQL Server 2005 Mobile Edition" type="Microsoft.SqlServerCe.Client.SqlCeClientFactory, Microsoft.SqlServerCe.Client, Version=9.0.242.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91" />
  9.     <add name="Oracle Data Provider for .NET" invariant="Oracle.DataAccess.Client" description="Oracle Data Provider for .NET" type="Oracle.DataAccess.Client.OracleClientFactory, Oracle.DataAccess, Version=2.102.2.20, Culture=neutral, PublicKeyToken=89b483f429c47342" />
  10.   </DbProviderFactories>
  11. </system.data>
  12. ...

 

Tags: , , ,

.NET Development

Comments

6/8/2010 2:59:05 PM #

Led plant lights

Thanks for the  post on Oracle installation. You made some goos point here. I really appreciate your work.

Led plant lights United States | Reply

6/18/2010 2:17:27 PM #

gagner de l'argent facile au casino en ligne

It helped me with ocean of knowledge so I really believe you will do much better in the future I appreciate everything you have added to my knowledge base.Admiring the time and effort you put into your blog and detailed information you offer!

gagner de l'argent facile au casino en ligne India | Reply

6/24/2010 5:35:17 PM #

online payday advance

When you come to a roadblock, take a detour.

online payday advance United States | Reply

6/25/2010 5:17:48 PM #

Leslie Wilson

Very thanks for great code. It helped me with ocean of knowledge so I really believe you will do much better in the future I appreciate everything you have added to my knowledge base.Admiring the time and effort you put into your blog and detailed information you offer!

Leslie Wilson United States | Reply

7/11/2010 9:05:11 AM #

same day loans

Each friend represents a world in us, a world possibly not born until they arrive, and it's only by this meeting that a new world is born. http://www.clicknpayday.com

same day loans United States | Reply

7/14/2010 6:31:00 AM #

data match         

Good article...I will use some of these interesting principles myself...more great info please...

data match       United States | Reply

7/15/2010 2:57:41 PM #

Royquener

Very thanks!!!

Royquener Brazil | Reply

7/17/2010 6:27:27 PM #

Rosacea

Thanks for the solution, I thought it might have something to do with config, but you have solved it

Rosacea United Kingdom | Reply

7/29/2010 12:08:20 PM #

online casinos

A provider is responsible for connecting to a specific database. Why specific? The reason is that a provider for an Oracle database cannot be used to connect to a SQL Server database and vice-versa. Next, you need a command object that can be used to execute the database commands of your choice.

online casinos India | Reply

8/17/2010 9:37:48 AM #

TrainPro School

I am going through a book called 'Beginning ASP.NET 2.0 E-Commerce in C# 2005" and I am trying to run  the first few elements of the project.  I have managed to solve a few bugs (mostly typos) - the one which is causing me a headache now though.

TrainPro School United States | Reply

8/17/2010 12:11:48 PM #

traslochi milano

Good article...I will use some of these interesting principles myself...more great info please...

traslochi milano Italy | Reply

8/18/2010 12:22:28 PM #

invest in rotherham

Non-profit, as well as government agency business plans tend to focus on the "organizational mission" which is the basis for their governmental status or their non-profit, tax-exempt status

invest in rotherham United States | Reply

8/23/2010 9:39:20 AM #

ADDIO CELIBATO ROMA

Hey very nice blog!! Man .. Beautiful .. Amazing .. I will bookmark your blog and take the feeds also..

ADDIO CELIBATO ROMA Italy | Reply

9/6/2010 7:58:54 AM #

Bed in a bag

I was quite pleased to come upon this website.I wanted to thank you for this Interesting article!! I definitely loved every line of it and I have you favorited to check out new articles you post.

Bed in a bag United States | Reply

9/6/2010 2:22:36 PM #

Cairns Party Tour

Stuck in bed sick as a dog. At least your blogs keeping me sane.

Cairns Party Tour United States | Reply

9/7/2010 10:08:15 AM #

Dallas SEO

Incredible information.This has really made my task easier...please keep writing.

Dallas SEO United States | Reply

9/7/2010 11:47:05 AM #

fico score

The Oracle Data Provider for .NET (ODP.NET) features optimized ADO.NET data access to the Oracle database. ODP.NET allows developers to take advantage of advanced Oracle database functionality, including Real Application Clusters, XML DB, and advanced security. The data provider can be used with the latest .NET Framework 4 version.

fico score United States | Reply

9/7/2010 8:53:54 PM #

asdfpoiu

asdfpoiu

asdfpoiu Switzerland | Reply

9/7/2010 8:54:34 PM #

asdfpoiu

asdfpoiu

asdfpoiu Kuwait | Reply

Add comment




  Country flag

biuquote
  • Comment
  • Preview
Loading