Share via


ServerContext.GetContext Method (String)

Gets the ServerContext instance for the specified Shared Services Provider.

Namespace:  Microsoft.Office.Server
Assembly:  Microsoft.Office.Server (in Microsoft.Office.Server.dll)

Syntax

'Declaration
Public Shared Function GetContext ( _
    sharedResourceProviderName As String _
) As ServerContext
'Usage
Dim sharedResourceProviderName As String
Dim returnValue As ServerContext

returnValue = ServerContext.GetContext(sharedResourceProviderName)
public static ServerContext GetContext(
    string sharedResourceProviderName
)

Parameters

  • sharedResourceProviderName
    Type: System.String
    The name of a Shared Resource Provider in the local farm.

Return Value

Type: Microsoft.Office.Server.ServerContext
A ServerContext object.

Examples

//replace SSP_GUID with a string containing the application GUID for the SSP //hosting the search service
SearchContext srchContext = ServerContext.GetContext("SSP_GUID");

See Also

Reference

ServerContext Class

ServerContext Members

GetContext Overload

Microsoft.Office.Server Namespace