WebAuthenticationBroker.AuthenticateAsync throws exception

微笑、不失礼 提交于 2019-12-05 07:01:47

I'm not sure but I think that the WebAuthBroker needs to be invoke on the UI Thread since it is trying to change something to your UI in the way of showing you the pop-up.

WebAuthenticationBroker.AuthenticateAsync kicks off AuthHost.exe process as a child of the app process, and the HRESULT returned by the exception indicates that AuthHost.exe failed unexpectedly. When launched, AuthHost tries to purge cookies, content and history from non sso containers, and if it fails, it backs off. On the other side, a Windows App runs in a sandbox with a set of permissions different from a desktop application. Thus Internet Explorer itself or a desktop application doing SSO might be able to work normally, but AuthHost will not be allowed to do required clean up on start. In my case, a user running the app was a part of the group that was granted full access to the folder, but the user itself did not have direct file access permissions. However, the group rights got stripped off in the app sandbox. In a default set up, permissions are configured properly, and no such problems should arise. However, in come cases a user moves the Temporary Internet Files to a new location, which might have a slightly different set of file access permissions. The other response on this thread suggests that deleting and re-creating profile helps. This operation resets Temporary Internet Files settings in the Internet Explorer to default, indirectly supporting my suggestion.

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