ServerAgent.WaitForServerAvailable(Int32)

The WaitForServerAvailable method checks to see whether the Microsoft Lync Server 2010 process has started and initialized.

NoteNote

Applications should call this method before they create their first ServerAgent object.

Syntax

[C#]

  Copy imageCopy Code
public static void WaitForServerAvailable(Int32)(
  Int32 maxRetryCount
);

Syntax

[Visual Basic .NET]

  Copy imageCopy Code
Public Shared Function WaitForServerAvailable(Int32)( _
  ByVal maxRetryCount As Int32 _
) As void
Implements ServerAgent.WaitForServerAvailable(Int32)

Parameters

maxRetryCount

Specifies the maximum number of times to check.

Remarks

If Lync Server 2010 is not available, this method will sleep for 10 seconds and check again, for up to maxRetryCount times. When Lync Server 2010 is available, this method returns; if the server does not become available after waiting for the specified number of times, it throws either UnauthorizedException or ServerNotFoundException.

Requirements

Redistributable: Requires Microsoft Lync Server 2010

Namespace:Microsoft.Rtc.Sip

Assembly: ServerAgent (in ServerAgent.dll)

See Also

Concepts