Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Computer Certification > MCTS > Working with the configurationmanager class

Reply
Thread Tools

Working with the configurationmanager class

 
 
ChigbuaUmuenu
Guest
Posts: n/a
 
      05-21-2007
I am working on a windows application and want to read my connection string
from my application configuration file.

My code looks like:

Dim myvalue As String =
System.Configuration.ConfigurationManager.AppSetin gs("myConnectionString")

However, Visual Studio 2005 underlines ConfigurationManager with a blue wavy
line. When I point at it, it states that ConfigurationManager is not defined.

Is there a reference I need to add to my application? I need help on how to
read my settings from my App.config. I also do not want to use the obsolete
ConfigurationSettings.AppSettings.

I will be glad to get a clue to this problem.

Thank you.

--
Okoronkwo Chinedu
Crazy About Learning
 
Reply With Quote
 
 
 
 
ChigbuaUmuenu
Guest
Posts: n/a
 
      05-22-2007
Thanks to everybody who may have wanted to provide me solution.
I discovered I was suppose to add reference to the System.Configuration dll

I added the reference and it worked.

I got this clue from MCTS Self - Paced Training Kit Exam 70-536. The writers
did a mavelous job in the book. I am also happy with the stratification
Microsoft has brought into the MCP Program.

Obviously, a beginner will have a better understanding of the .NET Framework
2.0 with 536. It will make him productive quickly.
--
Okoronkwo Chinedu
Crazy About Learning


"ChigbuaUmuenu" wrote:

> I am working on a windows application and want to read my connection string
> from my application configuration file.
>
> My code looks like:
>
> Dim myvalue As String =
> System.Configuration.ConfigurationManager.AppSetin gs("myConnectionString")
>
> However, Visual Studio 2005 underlines ConfigurationManager with a blue wavy
> line. When I point at it, it states that ConfigurationManager is not defined.
>
> Is there a reference I need to add to my application? I need help on how to
> read my settings from my App.config. I also do not want to use the obsolete
> ConfigurationSettings.AppSettings.
>
> I will be glad to get a clue to this problem.
>
> Thank you.
>
> --
> Okoronkwo Chinedu
> Crazy About Learning

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
ConfigurationManager Class Unavailable in Class Libraries =?Utf-8?B?TWlrZQ==?= ASP .Net 2 10-04-2006 04:33 PM
How does ConfigurationManager.AppSettings.Set stores values? =?Utf-8?B?bmF0YXNoYQ==?= ASP .Net 3 03-06-2006 12:48 PM
ConfigurationManager class not available in VS2005 web project Ben Fidge ASP .Net 1 02-11-2006 02:05 PM
ConfigurationManager question ASP.NET 2.0 Mark ASP .Net 1 01-11-2006 12:50 PM
ConfigurationManager and web.config and ASP.NET refresh curiosity =?Utf-8?B?SmF5IEhpbHlhcmQ=?= ASP .Net 1 04-05-2005 04:12 AM



Advertisments