SharePoint 2010

Supplement Web.Config (Custom Web.Config Files)

In this article, I am going to write about having Supplement Web.config files for all your custom config settings


In the approach You can make use of 14/Config folder. You can generate Custom Web.config XML file and deploy to this folder. When New Web Application is created or Web application is extended, Foundation Server will copy all content of XML files Located in 14/config to root folder’s web.config file

You need to make sure about

1) Naming the XML, The xml has to be named WEBCONFIG.*.XML

2) Tags, you need to use <Actions> <add> tags as shown below

Sample XML

<?xml version=”1.0″ encoding=”utf-8″ ?>

  <Add path=”configuration/appSettings”>

<add key=”SampleKey” Value=”SAmpleValue” />


You can Push custom config setting from 14/Config to root folder’s Web.config by running below command as well, This is specially use full for existing application.

stsadm –o CopyAppBinContent

Packing XML to WSP

You can deploy Custom Web.config to 14/Config folder by packaging it to WSP by mapped folder.


1) Custom Configuration in Web.config is not lost up gradation of server like installing Service Pack


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s