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