Modifying the web.config with SPWebConfigModifications

Recall that in Hour 5, in the discussion on the delegate controls, you had to register your custom sitemap provider by putting the following entry in the providers section of the web.config:

<add name="CustomSiteMapProvider"siteMapFile="_layouts/DelegateControlDemo/custom.sitemap"type="Microsoft.SharePoint.Navigation.SPXmlContentMapProvider,Microsoft.SharePoint, Version=14.0.0.0,Culture=neutral, PublicKeyToken=71e9bce111e9429c" />

At that time you did this manually, and it might just work quite well in a development environment. But imagine in a production environment, where you have more than one WFEs (Web Front Ends), you would end up modifying manually web.config on the web front end. ...

Get Sams Teach Yourself SharePoint® 2010 Development in 24 Hours now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.