Page 1 of 1
ADO.NET Provider not registered
Posted: Thu 02 Jul 2009 13:19
by felipecorrea
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.
Posted: Fri 03 Jul 2009 09:42
by Shalex
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:
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.
Posted: Wed 09 Sep 2009 14:28
by felipecorrea
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?
Posted: Wed 09 Sep 2009 15:32
by Shalex
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.