我正在按照 Add authentication to your Mobile Services app 进行 Windows Phone 身份验证教程。我选择使用Azure Active Directory方式进行身份验证。但问题是:它总是失败并显示远程过程调用失败。 (HRESULT 异常:0x800706BE)位于以下代码
protected override async void OnNavigatedTo(NavigationEventArgs e)
{
await Authenticate();//here throws System.Exception in mscorlib.ni.dll
await RefreshMissionTable();
}
并且我确保我的 Azure 设置没有任何问题。奇怪的是,当我选择Windows Phone Universal App Sample,并再次执行相同的步骤时,它可以在Windows 8.1模拟器中运行!但仍然无法在Windows Phone 8.1模拟器中工作。 断点就留在这里
#if DEBUG && !DISABLE_XAML_GENERATED_BREAK_ON_UNHANDLED_EXCEPTION
UnhandledException += (sender, e) =>
{
if (global::System.Diagnostics.Debugger.IsAttached) global::System.Diagnostics.Debugger.Break();
};
#endif
}
}
}
最佳答案
这可能与 Windows Phone 8.1 上的 WebAuthenticationBroker 的一个已知问题有关:在加载应用程序的完整 UX 之前无法调用它。请查看此线程,了解问题的描述和建议的解决方法:https://social.msdn.microsoft.com/Forums/vstudio/en-US/95c6569e-2fa2-43c8-af71-939e006a9b27/mobile-services-loginasync-remote-procedure-call-failed-hresult-0x800706be?forum=azuremobile 华泰 五、
关于windows - Windows Phone 中的 Azure Active Directory 身份验证失败,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/28527388/