Monday, February 22, 2010

Layouts Folder in SharePoint Server 2007 & WSS3.0

Windows SharePoint Services 3.0 uses the following folder to deliver SharePoint administration pages to each site in the site collection:

%ProgramFiles%\Common Files\Microsoft Shared\Web server extensions\12\Template\Layouts

The layouts folder is a special directory that gets "virtualized" for each SharePoint site. That is, each SharePoint site will have a /_layouts path from the root of the Web. For example http://servername/sites/sitename/_layouts. You can make an ASP.NET 2.0 Web application available under each SharePoint site by deploying the application to the layouts folder. This How To illustrates deploying ASP.NET Web applications in the Windows SharePoint Services 3.0 _layouts folder.

Ref: Deploying ASP.NET Web Applications in the Windows SharePoint Services 3.0 _layouts Folder
http://msdn.microsoft.com/en-us/library/cc297200.aspx

Application _layouts Page Type
Application pages, which are also known as "_layouts" pages, are stored in a site's Microsoft Internet Information Services (IIS) virtual directory and support application implementations. Application pages include pages with names such as create.aspx, settings.aspx, and other similar _layouts pages

Note:
The concept of "layout pages" in Microsoft Office SharePoint Server 2007 is different from the Windows SharePoint Services 3.0 _layouts page type.

These pages are stored in the virtual directory for the SharePoint Web application. The _layouts directory is also virtualized as a subfolder of every SharePoint site, and is exposed in a site collection or subsite, for example, http://MyServer/_layouts/Mysite.aspx or http://MyServer/a/b/c/_layouts/Mysite.aspx.

By default, the _layouts folder is installed in the path C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\12\TEMPLATE\Layouts.

Note: When you create hard-coded URLs to custom pages that you place within the LAYOUTS directory, specify paths that use the root Web site of the site collection, but that do not include subsites within the path. For example, use /_layouts/pages/MyPage.aspx, not /MySubsite/_layouts/pages/MyPage.aspx. Specifying a subsite in the path prevents the page from being accessed.

Differences Between Application Pages and Content Pages

Application pages are processed differently from content pages, as follows:

· Application pages are not subject to the same restrictions as content pages about where custom code is allowed. In fact, application pages behave much like all other ASPX pages.

· Application pages, unlike content pages, cannot host SharePoint features such as dynamic Web Parts and Web Part Zones.

Ref: Application _layouts Page Type
http://msdn.microsoft.com/en-us/library/aa979604.aspx

How to customize application pages in the Layouts folder in SharePoint Server 2007 and in Windows SharePoint Services 3.0
http://support.microsoft.com/kb/944105

Custom HttpModule Example
The following custom module simply returns a Web page message at the beginning of any HTTP request and another after the request has been processed.
http://msdn.microsoft.com/en-us/library/aa719858(VS.71).aspx

Catching unhandled exceptions in SharePoint
http://blogs.msdn.com/jannemattila/archive/2008/02/04/catching-unhandled-exceptions-in-sharepoint.aspx

Using HTTP Module for SharePoint 2007 (MOSS/WSS) site using FBA And RSA
http://blogs.msdn.com/pranab/archive/2007/12/13/using-http-module-for-sharepoint-2007-moss-wss-site-using-fba-and-rsa.aspx

No comments:

Post a Comment