Troubleshooting Lync 2010 Control Applications

Use read-only properties that are inherited from the UCBase class to display Microsoft Lync 2010 Control initialization errors at run time. Lync 2010 Controls automatically establish a connection to Microsoft Lync 2010 when they load. The first control to load establishes the connection, which is shared by all subsequently loaded controls.

When a Lync 2010 Control does not initialize the connection to Lync 2010, the initialization state and error are stored in the following properties on the control.

Property

Description

InitializationError

Provides an enumeration value of type LyncControlInitializationError to indicate the reason for the initialization failure.

InitializationFailed

Returns a Boolean value indicating whether initialization failed.

InitializationErrorMessage

Provides a string message that describes the error.

Code Example

Use the following XAML code to display Lync 2010 Control initialization errors at run time.

<StackPanel>
  <TextBlock HorizontalAlignment="Left" Text="Application Initialization Failed:" />
  <TextBox Text="{Binding InitializationFailed, ElementName=presence, Mode=OneWay}" />
  <TextBlock HorizontalAlignment="Left" Text="Application Initialization Error:" />
  <TextBox Text="{Binding InitializationErrorMessage, ElementName=presence, Mode=OneWay}" />
  <controls:PresenceIndicator Source="sip:elise@contoso.com" />
</StackPanel>

See Also

Other Resources

Lync 2010 Controls