Search code examples
c#livewindows-storewindows-livelive-sdk

LiveAuthClient InitializeAsync hangs


I am having trouble with a demo from msdn

The demo

On the method updateUserName:

public static async Task updateUserName(TextBlock userName, Boolean signIn)
        {
            try
            {
                // Open Live Connect SDK client.
                LiveAuthClient LCAuth = new LiveAuthClient();
                LiveLoginResult LCLoginResult = await LCAuth.InitializeAsync();
                try
                {
                    //this is never reached
                    LiveLoginResult loginResult = null;
                    if (signIn)
                    ......

the code hangs at ht InitialuzeAsync() method and never enters the try statement. Can someone who has used the live SDK please tell me what migh be wrong? The code is a direct copy-paste from the demo and the live SDK was installed via NuGet on VS2012.


Solution

  • Seems you have to associate your app with the store to use this feature, or else it hangs. After associating it, everything started working.