This documentation is archived and is not being maintained.

SPHttpApplication Class

Windows SharePoint Services 3

Processes requests for Windows SharePoint Services pages, controls, Web services, and other resources that are associated with a particular Windows SharePoint Services application on the Internet Information Server (IIS).


Namespace:  Microsoft.SharePoint.ApplicationRuntime
Assembly:  Microsoft.SharePoint (in Microsoft.SharePoint.dll)

[SharePointPermissionAttribute(SecurityAction.InheritanceDemand, ObjectModel = true)]
[AspNetHostingPermissionAttribute(SecurityAction.InheritanceDemand, Level = AspNetHostingPermissionLevel.Minimal)]
[SharePointPermissionAttribute(SecurityAction.LinkDemand, ObjectModel = true)]
[AspNetHostingPermissionAttribute(SecurityAction.LinkDemand, Level = AspNetHostingPermissionLevel.Minimal)]
public class SPHttpApplication : HttpApplication

The SPHttpApplication class is declared in the Global.asax file at the root of the virtual directory for the Windows SharePoint Services application.

You do not normally create SPHttpApplication objects with your own code. The first time a Windows SharePoint Services page is requested, a SPHttpApplication object is automatically created to process the request. After the request is processed, the object remains in a pool of SPHttpApplication objects until the application itself is restarted. When additional requests for pages or resources are received, an object in the pool is used to handle them. If all objects in the pool are busy, a new one is created and added to the pool.

SPHttpApplication overrides the GetVaryByCustomString and Init methods; and it adds RegisterGetVaryByCustomStringHandler and DeregisterGetVaryByCustomStringHandler methods. Otherwise, it is identical to HttpApplication.

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.