What\'s the difference between the WebConfigurationManager and the ConfigurationManager?
When should I use one over the other?
Although WebConfigurationManager is located in the System.Web assembly the ConnectionStringSettingsCollection that it returns is located in System.Configuration.
If you are getting the error
Cannot apply indexing with [] to an expression of type 'System.Configuration.ConnectionStringSettingsCollection'
while trying to access the array index...
WebConfigurationManager.ConnectionStrings["Name"].ConnectionString
make sure you have a reference to assembly System.Configuration