SessionStateService.TryGetService Method

Gets the default SessionStateService for a farm.

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

Syntax

'Declaration
Public Shared Function TryGetService ( _
    farm As SPFarm _
) As SessionStateService
'Usage
Dim farm As SPFarm
Dim returnValue As SessionStateService

returnValue = SessionStateService.TryGetService(farm)
public static SessionStateService TryGetService(
    SPFarm farm
)

Parameters

Return Value

Type: Microsoft.Office.Server.Administration.SessionStateService
A SessionStateService object corresponding to a farm if one is present; otherwise a null reference (Nothing in Visual Basic).

See Also

Reference

SessionStateService Class

SessionStateService Members

Microsoft.Office.Server.Administration Namespace