[Internet Setting] localhost 無法偵測到本機已登入的 windows 認證

如題。我每次在本機 debug 一個網站時,只要開始 debug ,網頁上就會要求我輸入 windows 認證帳號密碼。

HttpContext.Current.User.Identity.Name = '' 

HttpContext.Current.User.Identity.IsAuthenticated = false

原來是因為我動到了 網路安全性,如下設定就可以正常使用 windows 認證了。