How do you do Impersonation in UWP?

三世轮回 提交于 2019-12-10 11:13:11

问题


I am working on UWP application. A scenario came where i want to change the current context user(current login user).For that i am trying to implement Impersonation in UWP. In general windows or web application I am able to change the current context user by using sample code available on following link: http://www.codeproject.com/Articles/10090/A-small-C-Class-for-impersonating-a-User But i am unable to implement this in UWP. I want to implement impersonation in UWP.


回答1:


Impersonation is not available for UWP applications. They are all tied to the current session user with only a restricted set of authorizations.

The LogonUser API used to impersonate is only available to desktop/win32 apps.

You can check the list of all the supported Win32 API in UWP here.



来源:https://stackoverflow.com/questions/40803421/how-do-you-do-impersonation-in-uwp

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