Updating web config

Here is the code if you really want to change the value in web.config.

Codes: Sincerely, Zong-Qing Li Microsoft Online Community Support Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question.

NET Framework Version 3.5 Microsoft Visual Web Developer 2008 91605-031-5000002-60175 Installed Edition: Professional why dont you load web.config file in xml document and there you can set or get any value, through xml Node or Node List object ? Name = "mydb Connection"; Hi there, Based on my understanding, this line of code "Configuration Manager.

Updating web config Monago sex cam

Sincerely, Zong-Qing Li Microsoft Online Community Support Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. It seemed to me that web config (I thougth that since it was in the app directory and had an app settings section was the place to set/save app things.

I suspect it would now be better to set/save these elsewhere (eg associated sql database). I have learnt quite a lot from these reponses thankyou I want to do this for a web service.

If you load the web.config in an XMLDocument, change a value, then save it, will it restart all currently running instances of the web service or let those finish first and only new web services calls would use the updated version?

I need a way to pass information in between different instances of the web service (i.e.

For an example that shows how to create a custom web.config file to change settings, see How to: Create a Supplemental .config File. file, you can use the Share Point Foundation object model to modify web.config settings.

For an example that shows how to modify settings programmatically, see How to: Add and Remove Web.config Settings Programmatically.For this reason, we recommend that you not directly edit these files.Make changes to web.config settings using either the method described in How to: Create a Supplemental .config File or the method described in How to: Add and Remove Web.config Settings Programmatically.There might be some bugs relating to non default namespaces that you're hitting. NET applications that need connection strings updated during deployment? NET applications to have their web.config files changed (like connection string scenario). I am hesitant to remove the xmlns because that is added by Visual Studio. But MSDeploy may have a bug related to the non default name space. For example, you might need to add a Safe Control entry, register an Http Module, or customize Session State, but a Share Point Foundation deployment includes numerous web.config files.

Tags: , ,