Last post Feb 03, 2007 03:05 AM by Steven Cheng - MSFT
Feb 01, 2007 04:11 AM|BalaKrishnan|LINK
[Idea] Is it possible to add Dynamically AppSetting Key / value pair's in webconfig file?
How? anybody can explain! through C# Coding
Thanks in advance
"Custom Config Section"
web.config C# ASP.net
Feb 01, 2007 05:09 AM|MIB426|LINK
here is similar thread
Feb 01, 2007 05:14 AM|satish_nagdev|LINK
i'm not sure if you can modify your web.config via code or not but be aware if you change it then your web app will be surely restarted, causing users to loose session.
Feb 01, 2007 06:02 AM|LaTtEX|LINK
Feb 01, 2007 06:35 AM|BalaKrishnan|LINK
Feb 02, 2007 03:32 AM|BalaKrishnan|LINK
Feb 03, 2007 03:05 AM|Steven Cheng - MSFT|LINK
Yes, you can. In ASP.NET 1.X you have to use file I/O or XML API to modify the web.config file directly. In .NET 2.0. the ConfigurationManager(for ASP.NET you should use WebConfigurationManager class) class provide methods to modify and update application's
However, you should take care that whenever ASP.NET application's web.config file get changed, it will restart. I don't think this should happen very frequent for an server-side application.
Hope this helps.