1. 当采用windows认证方式时,在本地机上可以正常访问,但是放到IIS上后,HttpContext.Current.User.Identity.Name的返回值为空(正常应该是 域名/登陆名),解决方法是在IIS 的虚拟目录上右键属性,选择Directory Security, 然后编辑Authentication and access control,设置Enable anonymous access 为不选中。
2.
1. 当采用windows认证方式时,在本地机上可以正常访问,但是放到IIS上后,HttpContext.Current.User.Identity.Name的返回值为空(正常应该是 域名/登陆名),解决方法是在IIS 的虚拟目录上右键属性,选择Directory Security, 然后编辑Authentication and access control,设置Enable anonymous access 为不选中。
2.