windows - Windows Phone 中的 Azure Active Directory 身份验证失败

标签 windows azure windows-phone-8 azure-active-directory

我正在按照 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/

相关文章:

c - Mac OS X 中的多线程

azure - 从 azure 函数应用检索主机 key

c# - Windows Phone 8 上的多行代码文本 block

c# - map 控件 : Remove or hide default map layer

c# - 更改 Windows 8 手机中的 xaml 网格背景 C#

c - 在 Windows 中跨重启访问相同的资源

Windows API 清除身份验证 token

c++ - 使用以编程方式创建的 Windows 媒体播放器进行基本播放

rest - Office 365 OneDrive REST API - "invalid_client"

linux - 用于 azure 云服务的 nix 操作系统