Share via


Modifying Configuration Settings for an Application to Coexist with Windows SharePoint Services

To make an application or Web application coexist with Microsoft® Windows® SharePoint™ Services, customize the web.config file of the application.

  • Exclude the path of the application from Windows SharePoint Services by performing the following steps:

    • On the Virtual Server Settings page in SharePoint Central Administration, click Define managed paths.
    • In the Add a New Path section of the Define Manage Paths page, type the URL to exclude in the Path box, select Excluded path as the option for Type, and click OK.
  • Clear out the ASP.NET handler used in Windows SharePoint Services and specify the default ASP.NET handler for all pages by opening the web.config file of the application and adding lines as follows:

    <httpHandlers>
       <clear />
       <add verb="*" path="*.aspx" type="System.Web.UI.PageHandlerFactory, System.Web, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
    </httpHandlers>
    
  • Because Windows SharePoint Services maintains a restrictive trust policy, you may need to adjust the trust level by adding a line like the following to the web.config file of the application.

    <trust level="Full" originUrl="" />
    

    For information on implementing code access security, see Code Access Security.

  • You may need to enable the session module by adding the following lines to the web.config file of the application. In the top-level web.config file for Windows SharePoint Services, the default value for the enableSesstionState attribute is false.

    <httpModules>
       <add name="Session" type="System.Web.SessionState.SessionStateModule"/>
    </httpModules>
    

    Note  If you receive a parser error message saying that the Session module is already in the application and cannot be re-added, remove the httpModules section.

Warning  Changes that you make to web.config may be overwritten when you install updates or service packs for Windows SharePoint Services, or when you upgrade an installation to the next product version.

For general information about the web.config files used in a Windows SharePoint Services deployment, see Working with web.config Files.