簡體   English   中英

ASP.NET MVC 應用程序 Windows 身份驗證在使用 Forms 身份驗證后停止工作

[英]ASP.NET MVC App Windows Authentication stops working after using Forms Authentication

這讓我很煩惱,但我認為我將問題追溯到使用 Forms 身份驗證應用程序,現在我已切換回嘗試使用 Windows 身份驗證,但出於某種原因只想繼續使用 Z6450242531912981C3683CAE88A23身份驗證。

剛才在web.config中照常使用,甚至嘗試過Signing Out of Forms Authentication,但仍然堅持在Forms Authentication中工作。

所以我在嘗試 System.Web.HttpContext.Current.User.Identity.Name 時得到的結果是一個很好的空字符串,並且用戶未經過身份驗證。

如何找回我的 Windows 身份驗證?

歡呼邁克爾

檢查 web 應用程序文件夾是否配置為使用 IIS 中的 Windows 身份驗證,還要檢查內容文件,它們應該繼承父權限。 還要重新檢查 web.config 文件中的身份驗證模式,確保將其設置為 Windows。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM