GetContext(System.Web.HttpContext) Method

The GetContext method of the PortalApplication class gets a reference to a PortalContext object that represents the current application context from the specified HttpContext object.

Parameters

context An HttpContext object that represents an application context.

Return Value

A Microsoft.SharePoint.Portal.PortalContext that represents the current application context.

Exceptions

Exception type Condition
InvalidOperationException The System.Web.HttpContext.Current static property is null.

Remarks

The GetContext method gets a cached PortalContext object from the specified HttpContext object.

Requirements

Platforms: Microsoft Windows Server 2003

Security: Code Access Security