Click here to Skip to main content
15,890,185 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,

I have a following code to connect oracle database,

string ProviderName = "Oracle.DataAccess.Client"
DbProviderFactory factory = DbProviderFactories.GetFactory(ProviderName);

I am able to connect to oracle in console and winforms application. The code above is in a seperate class library. I have installed 64bit ODAC. The ORACLE.DATAACCESS is set to 2.x ver 2.112.3.0. I have checked machine.config entries Framework64 v2.0.50727 and v4.0.30319

<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.112.3.0, Culture=neutral, PublicKeyToken=89b483f429c47342">

CPU = Any CPU Framework=3.5

When I call the same code from class library in ASP.net then I get the following error

System.ArgumentException was unhandled by user code
Message=Failed to find or load the registered .Net Framework Data Provider
Source=System.Data
StackTrace:
at System.Data.Common.DbProviderFactories.GetFactory(String providerInvariantName)
I have even set the appool to allow 32-bit applications.

How do I resolve this error?

Thanks in advance
Posted

1 solution

Did you solve this issue. I am running into the same problem.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900