c# - Error while running LiveAuthClient's LoginAsync -


i'm trying write simple windows store app forces user login right away. i'm following these guides:

http://msdn.microsoft.com/en-us/library/live/hh968445.aspx

and

http://msdn.microsoft.com/en-us/library/live/hh826543.aspx#csharp

and i've added following:

public liveconnectsession session     {                 {             return _session;         }         set         {             _session = value;         }     }      private async void initauth()     {         if (!windows.applicationmodel.designmode.designmodeenabled)         {             try             {                 authclient = new liveauthclient();                 list<string> perms = new list<string>() { "wl.signin", "wl.basic", "wl.skydrive" };                 liveloginresult authresult =                     await authclient.loginasync(perms);                 if (authresult.status == liveconnectsessionstatus.connected)                 {                     this.session = authresult.session;                 }             }             catch (exception e)             {                 string message = e.message;             }         }     } 

i call initauth() app() constructor.

i "element not found" excetion, , following stack trace:

   @ microsoft.live.liveauthclient.<executeauthtaskasync>d__4.movenext()    end of stack trace previous location exception thrown     @ system.runtime.compilerservices.taskawaiter.throwfornonsuccess(task task)    @ system.runtime.compilerservices.taskawaiter.handlenonsuccessanddebuggernotification(task task)    @ system.runtime.compilerservices.taskawaiter`1.getresult()    @ tunehoc.app.<initauth>d__1.movenext() in <filename> 

does know problem?


Comments

Popular posts from this blog

basic authentication with http post params android -

vb.net - Virtual Keyboard commands -

How to get multiresult with multicondition in Sql Server -