以Windows形式切换用户 [英] switching user in windows form

查看:78
本文介绍了以Windows形式切换用户的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好!

我创建了一个应用程序,该应用程序的安全模块是当用户位于域中时可以使用该应用程序

如果用户不在域中

他可以切换用户

我如何在不关闭应用程序的情况下以编程方式切换用户

hi to all!

i create an application whose security module is when the user is in domain can use the application

if the user is not in domain

he can switch user

how can i switch user programitacially without closing the application

推荐答案

在您知道凭据的情况下尝试模拟新用户,否则从对话框中请求凭据然后模拟
看看此使用C#的Windows模拟 [
Try to impersonate the new user in case you know the credentials , else ask for the credentials from a dialog then impersonate
Take a look at this Windows Impersonation using C#[^]


你好kami124.

问题尚不清楚.您想更改应用程序用户还是Windows用户?
hello kami124.

The question is not clear. You want to change the users of your Application Or windows users??


尽管以上两个都是很好的答案.
此处是一个支持该功能的应用程序
登录,切换用户和注销只需尝试一下.

希望对您有帮助
Though above both is good answer.
here is one application which supports the functionality
Login, Switchuser and Logoff just try it.

Hop it will help you


这篇关于以Windows形式切换用户的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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