标签: c# asp.net-mvc iis-7 windows-authentication asp.net-authorization
我们有一个内部(C#/ MVC / IIS7)应用程序,要求用户不必输入凭据,但我们需要网络/ Windows用户名来识别当前用户是谁。
有没有办法实现这个目标?谢谢!
答案 0 :(得分:1)
这对我有用(ASP.NET C#):
string username = Request.LogonUserIdentity.Name;