ADO.NET Provider not registered

Discussion of open issues, suggestions and bugs regarding ADO.NET provider for Oracle
Post Reply
felipecorrea
Posts: 2
Joined: Thu 02 Jul 2009 13:07

ADO.NET Provider not registered

Post by felipecorrea » Thu 02 Jul 2009 13:19

Hello all.

Deploying an application using a Setup Project, it didn't registered CoreLab's dll. Using the method

Code: Select all

System.Data.Common.DbProviderFactories.GetFactoryClasses(), 
does not return it.
Any idea?


Thanks in advance.


I'm using OraDirect_oranet470pro2.

Shalex
Devart Team
Posts: 8034
Joined: Thu 14 Aug 2008 12:44

Post by Shalex » Fri 03 Jul 2009 09:42

Your environment should be informed about the existence of the provider factory to make the above method to work. The provider factory is described either in machine.config (globally) or in app.config (just for your application), but not in both files. Assuming that you use OraDirect .NET, this is done as follows:

Code: Select all

  
    
  
Replace 4.70.38.0 here with your actual version. You can find your current version in the Tools | Oracle | About menu of Visual Studio.

felipecorrea
Posts: 2
Joined: Thu 02 Jul 2009 13:07

Post by felipecorrea » Wed 09 Sep 2009 14:28

Great it works!
But...
I use this component within an application that has a setup.
How am I suppose to add this on installation process?

Shalex
Devart Team
Posts: 8034
Joined: Thu 14 Aug 2008 12:44

Post by Shalex » Wed 09 Sep 2009 15:32

If your application is the *.exe file, please put this entry to the *.exe.config file, and place this file in the directory where *.exe resides. If your application is class library, put the mentioned entry to global (machine.config) file. If your application is a web site (web application), put this entry to its web.config file.

Post Reply