Updated web.config modification manager for SharePoint

I downloaded the Web.config modification manager for SharePoint written by Vincent Rothwell from:
http://blog.thekid.me.uk/archive/2007/03/24/web-config-modification-manager-for-sharepoint.aspx

It is a nice add-in for the central admin. The tool manages all the web.config modifications that are done with the SPWebConfigModification class.

For our customer I need some more functionality like:
- adding modifications with the type EnsureSection;
- updating the current modifications;
- display the active modifications (the latest modification with the highest sequence);
- fix that the tool also works in complex farm scenario’s:
            SPFarm.Local.Services.GetValue<SPWebService>().ApplyWebConfigModifications();
changed that into:
            oApp.Farm.Services.GetValue<SPWebService>().ApplyWebConfigModifications();
(Because Local.Services can not access the other machines? I read about this somewhere on the internet)

Here you can download my update of the webconfig.aspx. Simply add the file to the following folder:
C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\TEMPLATE\ADMIN

This folder contains the application pages for the central admin. You can visit the page easily by visiting the following url: http://CENTRALADMIN:PORT/_admin/webconfig.aspx

Vincent Rothwell has also a version with a Solution installer (by Lars Fastrup) with a Custom Action that adds the file to the Central Administration > Application Management page.

Hope this helps you with controlling the web.config modifications.

6 Responses to “Updated web.config modification manager for SharePoint”

  1. thekid.me.uk Says:

    Web.config modification manager for SharePoint…

    The SPWebConfigModification class is used by features to m ……

  2. Sharepoint: Fixing Corrupted Web.config « Blog Says:

    [...] Now there’s also updated version from Harmjan Greving. You can download it from here. [...]

  3. Xenox Garavito Says:

    I used your update but found that it didn’t render properly.

    Just need a Server.HtmlEncode for the input text boxes of m.Value (Lines 317 & 319)

    value=”"

  4. BobC Says:

    Made changes Per Xenox, and the page renders now. Also changed the update process to only have the owner and date.

    Thanks!

  5. Davisich Says:

    Server.HtmlEncode didn’t work correctly. I used SPEncode.HtmlEncode.

    Really good tool.

  6. Harmjan Greving Says:

    Yes, that is a better way to do the HtmlEncoding! Thanks

Leave a Reply