我們的 ASP.NET Core 應用程序適用于 Windows 身份驗證,通過以下方式正確保護應用程序:[Authorize(Roles = "ABC\\MyGroup")]但是,當我們將應用程序移動到另一臺服務器時,運行該應用程序的池沒有訪問 Active Directory 的權限。在 Setup.cs 中,如何告訴 ASP.Net Core 使用特定帳戶訪問 Active Directory 以驗證請求。我不是在應用程序中詢問模擬,應用程序需要簡單訪問 AD,以便它可以確定用戶是否可以訪問控制器 services.AddAuthentication(IISDefaults.AuthenticationScheme); services.Configure<IISOptions>(options => { options.AutomaticAuthentication = true; options.ForwardClientCertificate = true; options.AuthenticationDisplayName = "EnterAccount"; });
- 1 回答
- 0 關注
- 252 瀏覽
添加回答
舉報
0/150
提交
取消