Saturday, March 31, 2012

web.config file

Hi all,

Is it possible to programmatically add entries in the web.config file in the AppSettings section? If so, how would I go about doing that?

Cheers,
D.In .NET v1 not with built-in configuration API. You certainly can edit it like an XML file (with XML APIs in System.XML namespace) but editing would cause application restarts whatsoever so app couldn't configure its own settings.

In .NET v2 there is API for managing configuration in read/write manner.
Thanks,

I just used the System.Xml classes to accomplish what I needed.

Cheers,
D.

0 comments:

Post a Comment