Freigeben über


自己动手打通Windows Store App, Windows Azure Mobile Service和Live Connect services

 

???Windows 8 Store App?,?????????Windows Azure Mobile Service?????,????Windows Azure Management Portal(????)??????????,???????????????

???????????????,??????????,???Microsoft Live Connect Services??,???LiveID???????,????????(??Facebook, Twitter, Google?)????????

????:https://www.windowsazure.com/en-us/develop/mobile/tutorials/get-started-with-users-dotnet/

??????,????????????????????,???Windows Azure Mobile Service????????????????,?Windows Azure Mobile Service?Live Connect services?????,??????????

??,????,?????????????,?????????????????????????Windows Live????,??????????,????????????,?????Store App?Windows Azure Mobile Service?Live Connect services?Visual Studio????????????????

?Visual Studio 2012?????????,?????????????:“{YOUR JAVASCRIPT FUNCTION NAME}: The authentication process failed with error: The application requesting authentication tokens is either disabled or incorrectly configured.”????????????

???????,??????????????Windows Azure Mobile Service?Live Connect services?????????

. Windows Store App?????????

???????Windows Store App????(https://appdev.microsoft.com/StorePortals/en-US/Home/Index)????????????????????(???)????App Name?Advanced Features?

clip_image002

??,?Advanced Features?????“Push notifications and Live Connect services info”,?????LiveID????????;??????Windows Push Notification service (WNS)??????,???????

clip_image004

[ ????] : ??????IDENTITY NAME?PUBLISHER??????:

clip_image006

[ ????] : ???????Visual Studio???package.appxmanifest???<Identity Name="{YOUR APP IDENTITY NAME}" Version="1.0.0.0" Publisher="YOUR APP PUBLISHER NAME" />?????

. Live Connect?????????

???,????“Push notifications and Live Connect services info”????????Live Connect????(https://manage.dev.live.com/)?

??????,????”Authenticating your service”????????:

clip_image008

[ ????] : ???,????Package Security Identifier (SID)?Client Secret???

?Live Connect???????(https://manage.dev.live.com/?biciid=LcDevPortal),??????????,?????(Settings)????API Settings?,????Package Security Identifier (SID)?Client Secret???????????,???????Windows Azure Mobile Service URL(??:https://{YOUR MOBILE SERVICE NAME}.azure-mobile.net/)???Redirect domain??????,?????????Package SID?

[ ????] : ???,????Redirect domain?Package SID???

clip_image010

. Windows Azure Management Portal(????)?????

??????Mobile Service???,??IDENTITY(??)??:

clip_image012

[ ????] : ???,???????Client ID?Client Secret???

?????????,?????PUSH(??)??:

clip_image014

[ ????] : ???,???????Client Secret?Package Security Identifier (SID)???

?Mobile Service?????????,??MANAGE KEYS,??Manage Access Keys???:

clip_image016

[ ????] : ???,??APPLICATION KEY???

. Visual Studio?????????

????,???Reference???Live SDK;??????????,????(https://msdn.microsoft.com/en-us/live/ff621310.aspx)????

clip_image018

[ ????] : ?Reference????Live SDK???,?????????,????JavaScript,??wl.js??????????????,?wl.init???,??redirect url,????????Redirect domain???

[ ????] : ?????????????,???Windows Azure Mobile Service???,???????,??,????????????Windows Azure Mobile Service URL?APPLICATION KEY??:

var client = new WindowsAzure.MobileServiceClient(

" https://{YOUR MOBILE SERVICE NAME}.azure-mobile.net/",

"{YOUR MOBILE SERVICE APPLICATION KEY}"

);

????????????,??????,???LiveID?????

?????????,???????????????,??“The app couldn’t resolve ms-appx:// {YOUR IDENTITY NAME} /undefined because of this error: RESOURCE_NOT_FOUND.”

????????????,?Visual Studio?Solution Explorer?,???????Store(??)???

[ ????] : ???????Store(??)??????:

clip_image020

????,OK!