Windows Phone中的Azure Active Directory身份验证失败 [英] Authentication failed with Azure Active Directory in Windows Phone

查看:87
本文介绍了Windows Phone中的Azure Active Directory身份验证失败的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用向您的移动服务应用添加身份验证.而且我选择使用Azure Active Directory方式进行身份验证.但是问题是:它总是失败,并显示 .远程过程调用失败. (来自HRESULT的异常:0x800706BE) ,位于以下代码

I am follow the window phone authentication tutorial with Add authentication to your Mobile Services app. And I choose using Azure Active Directory way to make authentication. But the question is: it always fails and shows The remote procedure call failed. (Exception from HRESULT: 0x800706BE) at the following code

    protected override async void OnNavigatedTo(NavigationEventArgs e)
    {

        await Authenticate();//here throws System.Exception in mscorlib.ni.dll
        await RefreshMissionTable();
    }

并且我确保Azure设置中没有问题.奇怪的是,当我选择Windows Phone通用应用程序示例并再次执行相同的步骤时,它可以在Windows 8.1模拟器中运行!但是仍然无法在Windows Phone 8.1模拟器中工作. 断点留在这里

And I make sure there is nothing wrong in my Azure setting. The weird thing is that when I choose windows phone universal app sample, and do the same procedure again, it can work in the windows 8.1 emulator! But still can't work in the windows phone 8.1 emulator . And the break point stays here

#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之前无法调用它.请查看此线程以获取有关该问题的描述和建议的解决方法:

this might be related to a known problem with the WebAuthenticationBroker on Windows Phone 8.1: it cannot be invoked until the full UX of the app has been loaded. Please take a look to this thread for a description of the issue and proposed workarounds: 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 HTH V.

这篇关于Windows Phone中的Azure Active Directory身份验证失败的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆