Showing posts from May, 2006

ConfigurationSettings.AppSettings["SQLConnString"]; -- Become Obsolete in .NET 2.0

Recently when I tried to create a data access component for my web application in .NET 2.0 I found that ConfigurationSettings class as become obsolete. In .Net 2.0 ConfigurationManager class that replaces ConfigurationSettings.

“System.Configuration.ConfigurationSettings.AppSettings["SQLConnString"]; this method is obsolete, it has been replaced by System.Configuration!System.Configuration.ConfigurationManager.AppSettings"

The System.Configuration.ConfigurationSettings.AppSettings["SQLConnString"];
Will give your warning that this “this method was obsolete”. What to do in order to use ConfigurationManager class? System.Configuration.dll - ensure you add a reference to this assembly. In .NET 2.0 all configuration functionality is in this separate assembly now.