Microsoft Knowledge Base Email Alertz

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

Receive Microsoft Knowledge Base articles by E-Mail?

Every night we scan the Microsoft Knowledge Base. If technologies you're interested in are updated, we'll send you an e-mail. You only get one e-mail a day, and only when new articles are added.

Click here to create a
FREE account
Already have an account?
[Click here to Login]

Search KbAlertz

Advanced Search

Webmasters
Put kbAlertz on your website.
[ Click Here for more! ]






Microsoft Knowledge Base Article

This article contents is Microsoft Copyrighted material.
©2005-©2007 Microsoft Corporation. All rights reserved. Terms of Use | Trademarks

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
Last Review:June 18, 2008
Revision:1.0

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\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 (http://msdn.microsoft.com/en-us/library/s10awwz0.aspx)

APPLIES TO
•Microsoft Office SharePoint Server 2007
•Microsoft Windows SharePoint Services 3.0

Back to the top

Keywords: 
kbhowto kbasp kbexpertiseadvanced kbinfo KB953459
   

Community Feedback System

Very often, it takes hours to solve a problem. Very often, you've looked high and low, and have tried a lot of solutions. When you finally found it, chances are, it was because someone else helped you. Here's your chance to give back. Use our community feedback tool to let others know what worked for you and what didn't.

Please also understand that the community feedback system is not warranted to be correct, it's simply a system that we've built to let people try and help each other. If something in a feedback response doesn't make sense to you, or you're not comfortable making changes that the feedback talks about (like registry edits), please consult a professional.

Thank you for using kbAlertz.com Feedback System.

-- Scott Cate

Be the first to leave feedback, to help others about this knowledge base article.

(Optional) Name

(Optional) Public URL Or Email

Comments
No HTML -- Text Only Please