SPServiceContext.GetContext Method (HttpContext)

Gets the service context that is associated with the specified HttpContext object.

Namespace:  Microsoft.SharePoint
Assembly:  Microsoft.SharePoint (in Microsoft.SharePoint.dll)
Available in Sandboxed Solutions: No

Syntax

'Declaration
Public Shared Function GetContext ( _
    httpContext As HttpContext _
) As SPServiceContext
'Usage
Dim httpContext As HttpContext
Dim returnValue As SPServiceContext

returnValue = SPServiceContext.GetContext(httpContext)
public static SPServiceContext GetContext(
    HttpContext httpContext
)

Parameters

Return Value

Type: Microsoft.SharePoint.SPServiceContext
The SPServiceContext object that is associated with the specified HttpContext object.

See Also

Reference

SPServiceContext Class

SPServiceContext Members

GetContext Overload

Microsoft.SharePoint Namespace