Friday, June 5, 2009

Sharepoint Merge Web Config on Codeplex

Project Description:
This utility is great for merging the web.config files for sharepoint based web applications.

-- This will only work for SharePoint web applications ( WSS and MOSS )
-- This need to be executed on all the Web Front ends ( I know painful , but SPWebConfigModification class is buggy and unreliable ). I have tested it on Single Server Farm so far
-- This utility can be run only one time per web application
-- To run it again on same web application [ no recommended for Production ] , all the GUIDs for the merge file need to be renewed. Check the sample merge xml file

-- This can merge many files from the mergefile location


1. Download the sample merge file and change it according to requirement

2. Download SPMergeWebConfig.exe and run the following command with proper parameters

SPMergeWebConfig.exe -file 'C:\Inetpub\wwwroot\wss\VirtualDirectories\80\' -mergefile 'C:\Inetpub\wwwroot\wss\VirtualDirectories\80\'

Note : -file parameter takes a location value where you web.config file reside
-mergefile paramter takes a location value for the merge file you downloaded , utility can accept more than one files with the file name pattern as +webconfig.*.xml+

Follow on Twitter