Select the product you need help with
- Internet Explorer
- Windows Phone
- More products
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 ID: 953459 - View products that this article applies to.
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.
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.
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\layoutsHowever, 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.
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 siteYou 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: