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)

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