Walkthrough: Use Log Data to Debug Lync Control Applications
This walkthrough shows how to use log data to debug a Microsoft Windows Presentation Foundation (WPF) application that contains Microsoft Lync 2010 Controls. This topic builds on Walkthrough: Add Logging to a Lync Controls Application, which describes how to enable logging.
Create a Lync WPF application that has logging enabled, and then add XAML code that contains an error.
To create the application
Create a Lync WPF application that has logging enabled. For more information, see Walkthrough: Add Logging to a Lync Controls Application.
In Page.xaml, in the XAML pane add the following XAML, which sets the Source property to an invalid URI.
Exit Microsoft Lync 2010.
To experience how easy it is to use log data, find the message that is created after exiting Lync 2010.
To set up and run the Lync Is Not Running scenario
Exit Lync 2010.
Build and run the application that is 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 that is created by a malformed URI after you exited Lync 2010 in the previous procedure.
To run the Lync Is Not Running scenario
The Lync 2010 session ended in the previous procedure. Restart Lync 2010.
Build and run the application that is 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.
Fix the malformed URI: sip:firstname.lastname@example.org.
Build and run the application.