Luc*_*oli 33 c# asp.net forms-authentication windows-authentication
我正在使用Forms身份验证.
在Windows身份验证中获取我使用的PC的用户名: User.Identity.Name
我也需要在Forms身份验证中使用此信息,但User.Identity.Name不起作用.
如何在不使用Windows身份验证的情况下获取User.Identity.Name?
Mat*_*att 59
要获取经过身份验证的用户的UserName:
HttpContext.Current.User.Identity.Name;
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
42401 次 |
| 最近记录: |