0
votes

I've followed all the documentation for .NET Core 2.0 windows authentication as specified here:

https://docs.microsoft.com/en-us/aspnet/core/security/authentication/windowsauth?tabs=aspnetcore2x

However, no matter how I set up my test project in IIS, I still get "prompted" for credentials even though I am already logged into the domain.

This is different than the behavior in .NET Core 1.0 (where I've set up many windows auth schemes successfully). I also have the required line in Startup.cs:

services.AddAuthentication(IISDefaults.AuthenticationScheme);

At this point, I'm not sure what to do - seems like some sort of issue with IIS serving the site with the new 2.0 auth settings. The strange thing is, when developing locally I do not get any issues (I have "Enable Windows Auth" in the Debug config checked).

All help appreciated..

1

1 Answers

0
votes

Fixed now - it turned out that the server was using an old version of AspNetCoreModule for IIS hosting, which was causing weird behavior. I opened an issue on GitHub with the IISIntegration team, so all credit goes to @Thratcher.

GitHub issue: https://github.com/aspnet/IISIntegration/issues/491

All I needed to do was install the 2.0.3 version of the .NET Core Hosting bundle & everything was magically fixed.