ConfigurationManager doesn't exist in current context (.net v 2)

Posted on 2006-06-01
Last Modified: 2008-03-17
Hi there,

Can anyone help?

I keep getting an error trying to upgrade my old code using appsettings..

NameValueCollection appSettings = ConfigurationManager.AppSettings;

Error      16      The name 'ConfigurationManager' does not exist in the current context      C:\Documents and Settings\igregson\My Documents\Visual Studio 2005\Projects\GetRealTime\GetRealTime\Program.cs      54      13      GetRealTime

I can't see to resolve it.... my old code used the following but it recommends i change it..

WebAddress = ConfigurationSettings.AppSettings["WebAddress"];

Any ideas ?

Thanks in advance

Question by:ianinspain
    LVL 28

    Accepted Solution

    try to Add Reference>System.Configuration.DLL
    LVL 8

    Expert Comment

        Can you check in  web.cofig , "WebAddress" tag is present or not
    LVL 96

    Expert Comment

    by:Bob Learned
    LVL 28

    Expert Comment

    that was deep :P

    Author Comment

    thanks ciuly! That was it...

    bit new with windows forms... been using and the equivelant and you didn't need to add a reference...

    I thought it was a built in reference...??


    Featured Post

    Do You Know the 4 Main Threat Actor Types?

    Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

    Join & Write a Comment

    Suggested Solutions

    Extention Methods in C# 3.0 by Ivo Stoykov C# 3.0 offers extension methods. They allow extending existing classes without changing the class's source code or relying on inheritance. These are static methods invoked as instance method. This…
    Exception Handling is in the core of any application that is able to dignify its name. In this article, I'll guide you through the process of writing a DRY (Don't Repeat Yourself) Exception Handling mechanism, using Aspect Oriented Programming.
    Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…
    Here's a very brief overview of the methods PRTG Network Monitor ( offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…

    755 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    16 Experts available now in Live!

    Get 1:1 Help Now