Click here to Skip to main content
15,868,292 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
string constr = "Data Source=(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=spp01)(PORT=1521))(CONNECT_DATA=(SID=Global)));User

Id=SYSMAN;Password=testman3"; 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

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=Unable to find the requested .Net Framework Data Provider. It may not be installed. Source=System.Data StackTrace: at System.Data.Common.DbProviderFactories.GetFactory(String providerInvariantName)

I have even set the apppool to allow 32-bit applications.

How do I resolve this error?

Thanks in Advance
Posted

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