But the code raise a NullReferenceException in the method LoginAsync. Here is the stack trace :

at Microsoft.Live.ResourceHelper.GetString(String name)
at Microsoft.Live.TailoredAuthClient.<AuthenticateAsync>d__0.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
at Microsoft.Live.LiveAuthClient.<ExecuteAuthTaskAsync>d__4.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
at Project.View.TestHotmailConnection.<Button_Click_1>d__0.MoveNext() in TestHotmailConnection.xaml.cs:line 63

I don't think the problem comes from authClient because it isn't null when LoginAsync is called. According to this post, the problem comes from an uninitialized resource dictionary. Does anyone know this problem, and eventually how to resolve it ?

Thanks

EDIT

To use Live Contect in a WinRT app, you need to declare it in the Windows Store Dashboard, maybe it's the solution, I don't have a Windows Store account.