我在 IIS 中托管了 ASP.NET Core MVC。我已经在 IIS 中启用了 Windows 身份验证。
在我的 Startup 中,我已经有了这个:
services.AddAuthentication(IISDefaults.AuthenticationScheme);
在我的登录按钮中,我调用:
Challenge("Windows")
但是我得到了
<块引用>InvalidOperationError:未注册身份验证处理程序。你忘记调用 AddAuthentication().AddSomeAuthHandler 了吗?
似乎我需要一个用于 Windows 的身份验证处理程序,我猜是这样的:
services.AddAuthentication()
.AddOpenIdConnect("oidc", o => { // Lots of options here});
但我找不到任何适用于 Windows 身份验证处理程序的 Nuget 包。我错过了什么?