Are there any .NET APis that can read/update the system.webServer node in web.config? I know I can do it via reading/parsing the web.config file as xml but that's awkward.
To read/update the system.web node in .NET 2 I can use:
HttpModulesSection httpModulesSection = (HttpModulesSection)configuration.GetSection("system.web/httpModules");
But is there any API based way of accessing system.web/modules using .NET 2?
I have to reference the .NET 2 version of system.web.configuration because I don't know in advance if my web app will be run on a server with .NET 2 or 3.5. So it is limited to .NET 2 API calls only.
Thanks