Programmatically Modify Value In Web.Config

  • Thread starter Thread starter Joey
  • Start date Start date
J

Joey

Is this possible?

I have an app where we are using forms authentication and are allow
editing/changing of security role names. Since I have set permissions
with <location> tags in web.config (i.e. allow roles="Administrator"),
I will also need to modify the values there.

TIA,
JP
 
web config is just an xml file so you can read/alter/save it using the
normal xml namespaces. However note that doing so will cause your
application to be restarted.
 
Back
Top