VS中运行时通过User.Identity.Name能取到用户名,发布到IIS上后,该值为空。

调查后发现在网站设定→【认证】中同时打开了【Windows认证】和【匿名认证】,

关掉【匿名认证】后就能正常取到windows用户名了。

 

相关文章:

  • 2022-01-20
  • 2022-12-23
  • 2021-09-03
  • 2021-05-23
  • 2021-10-13
  • 2021-12-09
  • 2021-12-07
  • 2021-12-20
猜你喜欢
  • 2022-01-17
  • 2021-08-18
  • 2021-07-30
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-02-14
相关资源
相似解决方案