使用ASP.NET获得AD帐号 “域\用户名”

1.在IIS中将访问方式更改为不允许匿名访问

2.在Web.config中将验证方式更改为
               <identity impersonate="true"/>
               <authentication mode="Windows" />

3.在源代码中使用
   var1 = Security.Principal.WindowsIdentity.GetCurrent.Name

相关文章:

  • 2021-12-26
  • 2022-12-23
  • 2022-12-23
  • 2021-11-22
  • 2021-07-23
  • 2022-12-23
  • 2022-12-23
  • 2021-09-09
猜你喜欢
  • 2021-07-28
  • 2021-09-01
  • 2022-12-23
  • 2021-05-19
  • 2021-06-11
相关资源
相似解决方案