Question providername without web.config

geoffsmiths

New member
Joined
Oct 6, 2010
Messages
1
Programming Experience
3-5
Hello Code masters!

I wanted to know if there's a way to retrieve the sqldataProvider from the global asp.net settings in IIS?

Like:
System.Configuration.ConfigurationManager.ConnectionStrings("conn").Providername(fromIIS)

I know that there's a way to retrieve the providername from the web.config, but I don't want to do this.
 

jmcilhinney

VB.NET Forum Moderator
Staff member
Joined
Aug 17, 2004
Messages
14,295
Location
Sydney, Australia
Programming Experience
10+
First up, if yours is a web app then you should be using the WebConfigurationManager class rather than the ConfigurationManager class. Either way, both classes have an OpenMachineConfiguration method that will return a Configuration object representing the machine config file.
 
Top Bottom