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 / March 2006

Tip: Looking for answers? Try searching our database.

manipulation of configuration files programmatically

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
venkatmudireddy@gmail.com - 28 Feb 2006 10:27 GMT
hi,

how to insert or update  configuration(.config) files using xml api or
with some thing else
i mean inserting a new element into particular section
e.g: i want to programmatically add an entry to appsettings section

i tried it with .xml extension but not working out with .config
extension

plz help me
Adam May - 01 Mar 2006 22:41 GMT
Hi venkatmudireddy,

If you're using the .NET Framework 2.0, things are significantly easier. Do
a google for 'ConfigurationManager' on MSDN. That will give you the tope page
for all the configuration-related classes.

If you're using the .NET Framework v1.x, you're going to have to do a bit
more work and treat the .config file as a regular XML document using the
classes in System.Xml. From there, you'd want to load the file into an
XmlDocument, then add your extra config items, then save the file back to the
right location.

HTH,

Adam

Signature

Adam May
Sydney, Australia
MCSD.Net

> hi,
>
[quoted text clipped - 7 lines]
>
> plz help me
venkatmudireddy@gmail.com - 08 Mar 2006 10:48 GMT
venkatmudireddy@gmail.com - 08 Mar 2006 10:49 GMT
but could u plz explain me how to read .config file as an  XmlDocument.

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.