Share via


ASP.NET vs. SharePoint: Modifying Web.config Files

Applies to: SharePoint Foundation 2010

This topic describes the differences between the way that web.config files are modified Microsoft ASP.NET development and the way they are modified in Microsoft SharePoint Foundation development.

Modifying Web.config

In ASP.NET development, the web.config files used by the ASP.NET solution are generally under the control of the developer and typically ship with the solution. In SharePoint Foundation, the web.config files are in the control of the farm administrator. Your solution can modify or extend the settings in a web.config in only two ways:

  • Create a supplemental webconfig.MySolution.xml file whose settings will apply to all web applications in the SharePoint Foundation farm.

  • Use the SharePoint Foundation object model to add web.config settings for one or more specified Web applications.

For more information about these techniques, see the node Working with Web.config Files.

For more information about the configuration stack in SharePoint Foundation, see Microsoft SharePoint Foundation as an ASP.NET Application.