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.
November 3rd, 2008 at 20:34
Web.config modification manager for SharePoint…
The SPWebConfigModification class is used by features to m ……
January 30th, 2009 at 20:21
[...] Now there’s also updated version from Harmjan Greving. You can download it from here. [...]
April 3rd, 2009 at 04:19
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=”"
April 9th, 2009 at 16:30
Made changes Per Xenox, and the page renders now. Also changed the update process to only have the owner and date.
Thanks!
November 5th, 2009 at 19:40
Server.HtmlEncode didn’t work correctly. I used SPEncode.HtmlEncode.
Really good tool.
November 6th, 2009 at 15:56
Yes, that is a better way to do the HtmlEncoding! Thanks