Warning "system. configuration. configurationsettings. getconfig (string)" is out of date.

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.