使用Windows身份验证获取Windows用户名 [英] Getting windows username using windows authentication

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

问题描述

使用Windows身份验证获取Windows用户名??? ..............

Getting windows username using windows authentication???..............

推荐答案

将应用程序配置为使用Windows身份验证,然后只需使用这段代码即可获取Windows域\用户名:

Once you have configured your app to use windows authentication, then just use this piece of code to get the Windows domain\username:

HttpContext.Current.User.Identity.Name


这篇关于使用Windows身份验证获取Windows用户名的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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