I need to programatically add or modify the following section in an asp.net web.config file:
<configuration>
<system.web>
<webServices>
<protocols>
<add name="HttpGet"/>
<add name="HttpPost"/>
</protocols>
</webServices>
</system.web>
</configuration>
I could manipulate the file at the XML level, but I prefer to use the configuration API whenever possible. I found ProtocolElement and ProtocolElementCollection classes, both in the System.Web.Services.Configuration namespace and in the System.Web.Services assembly, but after much googling I can't find any usage examples. I have the system.web.extensions/scripting/webServices sectionGroup defined in the configSections element - is that sufficient, or do I need to add a config section under that?
Any help manipulating this would be appreciated. We're currently using ASP.NET 2.0.