I am developing an application which will give a website administrator the ability to enable/disable a HttpModule without having to actually open and edit the web.config file. I have found it is quite easy to do this with appSettings node using the System.Configuration namespace, but it does not seem to include a way to modify the system.web/httpModules node.
Short of simply using XDocument/XElement, does anyone know of another way to do this? I have seen a couple of other ways involving some of the app start or app pre-start events, but I'm not sure this is a viable solution for me, since this is a HttpModule for a website that is already running. I have found the System.Web.Configuration.HttpModulesSection class, but this seems to be read-only. Any assistance would be much appreciated.