Determining Where to Build a Custom Application
Applies to: SharePoint Foundation 2010
You may want to create custom .aspx pages or Web applications and store them in a location that is accessible from all Web sites in your Microsoft SharePoint Foundation 2010 deployment. However, you may also want to create Web applications that contain custom code for central administrators to work with the global settings of a deployment.
Location for Custom ASPX Pages and Web Applications
You can build and store custom .aspx pages and Web applications in the following directory, which supports the _layouts virtual directory:
%ProgramFiles%\Common Files\Microsoft Shared\web server extensions\14\TEMPLATE\LAYOUTS
Pages in this directory are accessible from all Web sites in the SharePoint Foundation deployment by using a URL in the following form:
Location for Custom Code that Works with Global Settings
When you write custom code that only involves the Microsoft.SharePoint.Administration namespace and works with global settings in a SharePoint Foundation deployment, it is recommended that you create your Web application on the administrative port. Build and store .aspx pages and Web applications for the administrative port in the following directory:
%ProgramFiles%\Common Files\Microsoft Shared\web server extensions\14\TEMPLATE\ADMIN
Pages in the \ADMIN directory are accessible by using a URL in the following form:
For information about how to create a Web application in Microsoft Visual Studio 2010 that runs in the context of SharePoint Foundation, see Using Visual Studio for SharePoint Development.
Console applications can be created anywhere on the front-end Web server. For information about how to create a console application that runs in the context of SharePoint Foundation, see How to: Create a Console Application.