Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
139 views
in Technique[技术] by (71.8m points)

.net - How do I enable Windows auth?

I have ASP.NET Core MVC hosted in IIS. I have already enabled the Windows authentication in IIS.

I have looked at this: https://docs.microsoft.com/en-us/aspnet/core/security/authentication/windowsauth?view=aspnetcore-3.1&tabs=visual-studio

In my Startup, I already have this:

services.AddAuthentication(IISDefaults.AuthenticationScheme);

In my Login button, I call:

Challenge("Windows")

But I'm getting the

InvalidOperationError: No authentication handlers are registered. Did you forget to call AddAuthentication().AddSomeAuthHandler?

It seems like I need an authentication handler to be used for Windows, I'm guessing something similar to this:

services.AddAuthentication()
        .AddOpenIdConnect("oidc", o => { // Lots of options here});

But I can't find any Nuget package for Windows authentication handler. What am I missing?

question from:https://stackoverflow.com/questions/65559818/how-do-i-enable-windows-auth

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
Waitting for answers

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...