Export (0) Print
Expand All
This topic has not yet been rated - Rate this topic

How to: Use Log Data to Debug Lync Control Applications

[This is preliminary documentation and is subject to change.]

This topic demonstrates how to use log data to debug a Microsoft Windows Presentation Foundation (WPF) application that contains Microsoft Lync Controls. This walkthrough builds on How to: Add Logging to Lync Controls Applications, which describes how to enable logging.

For a list of prerequisites, see How to: Publish Presence.

Create a Lync WPF application with logging enabled, and then add XAML code that contains an error.

To create the application

  1. Create a Lync WPF application with logging enabled. For more information, see How to: Add Logging to Lync Controls Applications.

  2. In Page.xaml, in the XAML pane add the following XAML, which sets the Source property to an invalid URI.

    <controls:StartInstantMessagingButton Source="sip:typo@contoso"/>
    
  3. Exit Microsoft Lync 2013 Preview.

To experience how easy it is to use log data, find the message created after exiting Lync 2013 Preview.

To set up and run the Lync Is Not Running scenario

  1. Exit Lync 2013 Preview.

  2. Build and run the application created in the previous procedure. In the log file, output that resembles the following message appears.

    2010-07-21T13:16:05.4663269-07:00 : Error : MThreadId=10 : Categories=LyncServiceProvider : Message=UCClientInitializationFailed:Microsoft Lync 4.0.7400.542 or later is not running and it is required for this application. Please start Lync to resolve this issue.
    
    

Review the message created by a malformed URI after you exited Lync 2013 Preview in the previous procedure.

To run the Lync Is Not Running scenario

  1. The Lync 2013 Preview session ended in the previous procedure. Restart Lync 2013 Preview.

  2. Build and run the application created in the first procedure. In the log file, output that resembles the following message appears.

    Unable to create IContactModel from ContactUri.  Uri='typo@contoso.'
    Unable to create a contact for 'sip:typo@contoso.'. System.ArgumentException: Value does not fall within the expected range.
    
  3. Fix the malformed URI: sip:typo@contoso.com.

  4. Build and run the application.

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

Show:
© 2014 Microsoft. All rights reserved.