Live Connect authentication status always “Unknown”

我是研究僧i 提交于 2019-12-24 09:40:05

问题


I'm facing some problem when authenticating in my WP8 app via Live SDK.

I have added a SignInButton to my app:

<live:SignInButton x:Name="btnSignIn" 
    Scopes="wl.skydrive wl.skydrive_update wl.signin wl.offline_access"
    ClientId="MY_CLIENT_ID" 
    SessionChanged="btnSignIn_SessionChanged" 
    TextType="Login" />

In the code-behind I have the following:

private async void btnSignIn_SessionChanged(object sender, Microsoft.Live.Controls.LiveConnectSessionChangedEventArgs e)
{
    App.LiveSession = e.Session;
    if (e.Status == Microsoft.Live.LiveConnectSessionStatus.Connected)
    {
        App.LiveClient = new Microsoft.Live.LiveConnectClient(e.Session);                               
    }
}

When I tap the SignIn button, I show the screen where I enter my credentials, and give permissions to the app. Everything fine until there.

The problem is that after that, btnSignIn_SessionChanged is fired, as expectyed, but I always get Unknown in e.Stautus property.

If I tap the SignIn button again, I'm not asked for credentials, but yes for permission. After accepting, e.Status keeps returning Unknown, when it should be Connected.

In http://dev.live.com I have my app configured as mobile client. The app used to work in the past, and I'm not able to guess where can be the problem.

Any clue?


回答1:


This problem can also occur if you are using a proxy server. Using "Automaticaly detect settings" in LAN settings fixed this issue for me.



来源:https://stackoverflow.com/questions/19383328/live-connect-authentication-status-always-unknown

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!