Click to Rate and Give Feedback
MSDN
MSDN Library
Live Services SDK
Windows Live ID SDK
 How to Set Up Automatic Sign-in

  Switch on low bandwidth view
Live Services SDK
How to Set Up Automatic Sign-in

Before you call any Windows Live ID APIs for client applications, you must first add a reference to the component in Visual Studio.

  1. Open your project in Visual Studio.

  2. In Solution Explorer, right-click References, and then click Add Reference.

    Bb676887.3e9bad06-26f9-4012-ad1d-c8013e52fa8b(en-us,MSDN.10).gif
  3. In Component Name, locate Microsoft.WindowsLive.ID.Client, select it, and then click OK.

  4. Expand the References node, and then click Microsoft.WindowsLive.ID.Client.

  5. In the Properties window (shown here), set the Specific Version property to false.

    Bb676887.99f311cf-735a-4cdf-8dde-249452afaa67(en-us,MSDN.10).gif

To use the reference in code, you must include it with either the using directive (in C#) or an Imports statement (in Visual Basic). From the sample application:

using Microsoft.WindowsLive.Id.Client;

We recommend that you declare the variables to contain instances of the IdentityManager and Identity objects at the class level so that all your code can access them. From the sample application:

    public partial class MainWindow : Form
    {
        IdentityManager oIDMgr;
        Identity oID;
Bb676887.note(en-us,MSDN.10).gifImportant:
If the variable that contains the IdentityManager instance falls out of scope, all Identity objects created from it will be invalid.
© 2009 Microsoft Corporation. All rights reserved. Terms of Use  |  Trademarks  |  Privacy Statement
Page view tracker