自己动手打通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?
??,?Advanced Features?????“Push notifications and Live Connect services info”,?????LiveID????????;??????Windows Push Notification service (WNS)??????,???????
[ ????] : ??????IDENTITY NAME?PUBLISHER??????:
[ ????] : ???????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”????????:
[ ????] : ???,????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???
. Windows Azure Management Portal(????)?????
??????Mobile Service???,??IDENTITY(??)??:
[ ????] : ???,???????Client ID?Client Secret???
?????????,?????PUSH(??)??:
[ ????] : ???,???????Client Secret?Package Security Identifier (SID)???
?Mobile Service?????????,??MANAGE KEYS,??Manage Access Keys???:
[ ????] : ???,??APPLICATION KEY???
. Visual Studio?????????
????,???Reference???Live SDK;??????????,????(https://msdn.microsoft.com/en-us/live/ff621310.aspx)????
[ ????] : ?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(??)??????:
????,OK!