in VS 2005, The configurationsettings class is often used to read the Program Configuration File Information of the application, to obtain the database connection string. However, the following error often occurs:
warning "system. configuration. configurationsettings. getconfig (string) "expired:" This method is obsolete, it has been replaced by system. configuration! System. configuration. configurationmanager. getsection "
warning 1" system. configuration. configurationsettings. receivettings "is out of date:" This method is obsolete, it has been replaced by system. Configuration! System. configuration. configurationmanager. receivettings "
solution:
first . configuration. DLL file reference, both add reference in this project, find System in browsing. configuration. DLL file, which is usually stored in C:/Windows/Microsoft.. Net/framework/v2.0.50727 folder;
next . "system. configuration. configurationsettings. replace the appsettings index. net 2. "System. configuration. configurationmanager. deleettings" indexer under 0. Replace "system. configuration. configurationsettings. getconfig with system. configuration. configurationmanager. getsection