web.config file Settings Change

The web.config file controls most settings for the ASP.NET environment that the current SharePoint Products and Technologies is built upon.

Real World Example

A developer must register a Web Part globally as a safe control and can optionally add some application settings to the web.config file so that it will operate correctly. The developer creates a new web.config modification file that contains the appropriate settings, which is then installed on the server.

Technical Details

The web.config files are XML files stored in the directories that are exposed through SharePoint Products and Technologies and ASP.NET. Each web.config file is composed of multiple groups of configuration settings, which control how ASP.NET operates.

Additive web.config files can be used to apply web.config changes globally to every Web application on a server. They are merged together to create the web.config file for each content Web application The following is an example of an additive web.config file, webconfig.pwa.xml, included with Microsoft Office Project Server 2007.

<actions>
   <add path="configuration/SharePoint/SafeControls" id="{376C9977-14E1-4107-B599-2B091D22D477}">
      <SafeControl Assembly="Microsoft.Office.Project.Server.PWA, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" Namespace="Microsoft.Office.Project.PWA.WebParts" TypeName="*" Safe="True"/>
   </add>
   <add path="configuration/system.web/siteMap/providers" id="{2A7351DE-86A5-4a42-8D0C-86D352B52E8E}">
      <add name="PWASiteMapProvider" description="Project Web Access provider for global navigation" type="Microsoft.Office.Project.PWA.PWASiteMapProvider, Microsoft.Office.Project.Server.PWA, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" mode="Quick Launch" securityTrimmingEnabled="true" initializeMetadata="true"/>
      </add>
   <add path="configuration/system.web/httpModules" id="{B3156549-9487-45f9-BC83-C584C07A3527}">
   <add name="PwaAuthentication" type="Microsoft.Office.Project.PWA.PwaAuthenticationModule, Microsoft.Office.Project.Server.PWA, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" />
   </add>
</actions>

Additive webconfig files are stored in the following path:

%COMMONPROGRAMFILES%\Microsoft Shared\Web server extensions\12\CONFIG

You can use solutions to make safe control entry additions to the web.config files on any Web application wherever the solution is deployed. This is the preferred method to register Web Part safe control entries with minimal support team intervention.

Support Details

Anytime the web.config file is modified, it can trigger a reloading of the application domain, which can affect end users through cache deletion, loss of session state, processing failures, broken download/uploads, or page load delays.