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.