The configurationmanager class cannot be found in the system. Configuration namespace.

Source: Internet
Author: User

Here we talk about the problem of calling layer-3 programming in class:

Start to use VS 2005 and habitually use the configurationsettings class to read applications.ProgramThe compiler prompts the following information:
Warning 1 "system. configuration. configurationsettings. receivettings" is out of date: "This method is obsolete,
It has been replaced by system. Configuration! System. configuration. configurationmanager. deleetmanager"

So I tried to find the configurationmanager class to use. The result is that the configurationmanager class cannot be found in the system. Configuration namespace,
However, you can turn to the network to know that you still need to add references to the system. configuration. dll file ~~

After the event, I noticed that the original MS prompts a bit about this, but it is just a bit obscure --
This method is obsolete, it has been replaced by system. Configuration! System. configuration. configurationmanager. deleetmanager

I noticed no. The above section has more system. Configuration! This section ~
For example:
String we = system. configuration. configurationmanager. receivettings ["SQL"];

For example:
System. Web. httpcontext. Current. cache ["cache1"] = "value1 ";
System. Web. dll

 

Reprinted from: http://www.cnblogs.com/zgqys1980/archive/2006/11/20/566153.html

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.