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.

Comments

Popular posts from this blog

ASP.NET website "Cannot read configuration file due to insufficient permissions" in IIS 7 and Windows Server 2008

Error occurred in deployment step 'Install app for SharePoint': The System Account cannot perform this action.

Embrassing screen sharing interview : SharePoint