Share via


SPHttpApplication Class

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).

Inheritance Hierarchy

System.Object
  System.Web.HttpApplication
    Microsoft.SharePoint.ApplicationRuntime.SPHttpApplication

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

Syntax

<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 _
    Inherits HttpApplication

Dim instance As SPHttpApplication
[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

Remarks

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.

Thread Safety

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

See Also

Reference

SPHttpApplication Members

Microsoft.SharePoint.ApplicationRuntime Namespace

Other Resources

Global.asax Syntax