Tuesday, May 3, 2011

Add multiple sections to App.Config

Hi All, I need to add a section to my app.config programmatically. currently i use the Configuration editor where in there is seperate project which contains a class file with al configsection attributes set .I then use the configuration editor access this dll created and add a section .Now i want to access this same ConfigurationClass fill in values programmatically and add multiple sections to the app.config?

Need for this is i have a winForm which contains the server,dbname,usernameand password ,user can connect to multiple databases ovr a server so i need to save this information somewhere .

Thanks ,

From stackoverflow
  • Is the config file the best place for this information? Certainly, updating it programatically could lead to runtime errors, which aren't desireable.

    Can you supply more information about what the different databases are, for example Live / Test etc or just for different aspects within the same environment?

0 comments:

Post a Comment