验证Windows登录 [英] Authenticate windows login

查看:139
本文介绍了验证Windows登录的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

我正在Windows 7环境和C#点网中对Windows凭据进行身份验证,
请帮助我验证用户是否为管理员.
如果用户是管理员,我必须在登录页面上检查这些凭据并授予访问权限.
需要在本地计算机上进行身份验证.

我找到了这种方法,但是我不想检查域名
LogonUser(用户名,域,密码,2、0,引用tokenHandler);

谢谢.

Hello All,

I''m working in windows 7 environment and C# dot net to authenticate windows credentials,
Please help me to authenticate user is administrator or not.
I have to check these credentials at login page and grant access if user is administrator.
Authentication on local machine is needed.

I''ve found this method but I don''t want to check domain name
LogonUser(userName, domain, password, 2, 0, ref tokenHandler);

Thanks.

推荐答案

阅读以下内容:
Read the following : http://msdn.microsoft.com/en-us/library/system.security.principal.windowsimpersonationcontext.aspx[^]


这篇关于验证Windows登录的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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