asp.net集成域用户验证

1.   在web.config中设置<authentication   mode="Windows"/>  
  2.   在IIS-默认的Web站点-虚拟目录-属性-目录安全性-编辑中选择   "集成Windows验证",注意"匿名访问"一定不要选  
  3.   在asp.net中使用   User.Identity.Name   就可以得到域名和用户名.
原文地址:https://www.cnblogs.com/linn/p/1455132.html