How to use the "batch" attribute of the Web.config file compilation element in SharePoint Server 2007 and in Windows SharePoint Services 3.0

Article translations Article translations
Article ID: 953459 - View products that this article applies to.
Expand all | Collapse all

INTRODUCTION

This article describes how to use the batch attribute of the Web.config file compilation element in a Microsoft Office SharePoint Server 2007 Web site and in a Microsoft Windows SharePoint Services 3.0 Web site.

MORE INFORMATION

In SharePoint Server 2007, the setting is supported when you set the batch attribute of the compilation element to "true" in the Web.config file for the _layouts folders on a SharePoint Server 2007 Web site as follows.
<compilation batch="true" debug="false" />
Note By default, the Web.config file for the _layouts folders is located in the following folder:
C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\12\template\layouts
However, in SharePoint Server 2007, the setting is not supported when you set the batch attribute of the compilation element to "true" for the root of the SharePoint Server 2007 Web site. Therefore, the root site of the compilation element in the Web.config file should resemble the following element.
<compilation batch="false" debug="false" />
Note By default, the Web.config file for the root of the Web site is located in the following folder:
C:\inetpub\wwwroot\wss\VirtualDirectories\Web site
You can add the compilation element after the "/httpModules" section and before the "assemblies" section.

The batch attribute is used by the ASP.NET compilation element. This attribute controls all compilation for applications to which the Web.config file applies.

When the attribute is set to "true," the delay that you experience when you access files for the first time can be decreased. This is because, when the batch attribute is set to "true," all uncompiled files will be compiled in batch mode by ASP.NET.

However, for larger applications, there may be a significant delay when files are compiled for the first time because there are more file batches to compile. After the initial compilation, delays are decreased when you access the compiled files.

For more information, visit the following Microsoft Web site:
http://msdn.microsoft.com/en-us/library/s10awwz0.aspx

Properties

Article ID: 953459 - Last Review: May 1, 2009 - Revision: 2.0
APPLIES TO
  • Microsoft Office SharePoint Server 2007
  • Microsoft Windows SharePoint Services 3.0
Keywords: 
kbhowto kbasp kbexpertiseadvanced kbinfo KB953459

Give Feedback

 

Contact us for more help

Contact us for more help
Connect with Answer Desk for expert help.
Get more support from smallbusiness.support.microsoft.com