Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / New Users / June 2007

Tip: Looking for answers? Try searching our database.

Still Cannot Use ConfigurationManager Class in Code

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
EagleRed@HighFlyingBirds.com - 27 Jun 2007 21:48 GMT
I have noticed a number of entries regarding the use of the
ConfigurationManager class to read connection strings.  I writing a class
library that requires a DB connection.  I have an app.config file in the
application that contains the connection string.  I have set a project
reference to the System.Configuration.dll and I have the "using
System.Configuration" statement in the C#  code.  I can see the class as
public in the Object Browser with a ConnectionStrings property.  Yet I still
cannot use the class in my code; it fails to compile with an error,
"ConfigurationManager does not exist...".

How can I get this to work?  Other entries say that it should be working now.

Thanks,
Eagle
EagleRed@HighFlyingBirds.com - 27 Jun 2007 21:58 GMT
I modified my code and was able reference the ConfigurationManager in the exe
that references the class library per another entry in this newsgroup.  I was
able to successfully retrieve the connection string from the app.config file.
The question now becomes how can I achieve this in the class library.  Right
now it seems I need to pass the connection string to the dll in some way from
each component that references the class library.  I would really like to
hide this.

Thanks,
Eagle

> I have noticed a number of entries regarding the use of the
> ConfigurationManager class to read connection strings.  I writing a class
[quoted text clipped - 10 lines]
> Thanks,
> Eagle

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.