我正在開發Windows 10 UWP應用程序,因爲我正在使用Azure移動服務使用Azure移動服務作爲提供者來實現身份驗證用戶。在.Net後端使用Microsoft帳戶驗證用戶Azure移動服務在登錄後提供錯誤
我也跟着下面的文章與該應用程序登記的移動服務
更新的細節我的手機服務是一個.NET後端服務https://astraniprod.azure-mobile.net/
並且還更新了移動服務中的客戶端ID,祕密應用SID。
後,我寫了下面的代碼,啓動登錄彈出我的應用程序
private async System.Threading.Tasks.Task<bool> AuthenticateAsync()
{
string message;
bool success = false;
try
{
// Change 'MobileService' to the name of your MobileServiceClient instance.
// Sign-in using Facebook authentication.
user = await App.MobileService
.LoginAsync(MobileServiceAuthenticationProvider.MicrosoftAccount,true);
message =
string.Format("You are now signed in - {0}", user.UserId);
success = true;
}
catch (InvalidOperationException)
{
message = "You must log in. Login Required";
}
var dialog = new MessageDialog(message);
dialog.Commands.Add(new UICommand("OK"));
await dialog.ShowAsync();
return success;
}
}
我能看到登錄對話,也進入了我的Microsoft帳戶和密碼,在那之後我收到以下錯誤
我見過的其他人也發佈了關於這個在論壇,但我沒有找到問題的解決方案,我不知道在哪裏的問題是,其他供應商,如谷歌,Twitter的, Facebook工作很好,但只有Microsoft帳戶不能正常工作。
謝謝。
感謝您的回覆和有價值的解釋,它正在工作,現在我錯誤地在導致此問題的URL末尾添加空格。 – narendramacha