SessionStateService.TryGetService Method

Gets the default SessionStateService for a farm.

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


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

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


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


SessionStateService Class

SessionStateService Members

Microsoft.Office.Server.Administration Namespace