Reputation: 984
I am working on an app in ASP.NET Core 7 that uses the Windows Authentication and it asks for the domain credentials every single time I run the solution form the VS through the IIS Express. I run it under my domain account, so I expect it should get authenticated through it and there is no need to ask for the credentials again.
By now I tried these things, but without any success:
windowsAuthentication: true
, anonymousAuthentication: false
in launchSettings.json
forwardWindowsAuthToken=true
in web.config
https://localhost
to the Trusted sites or Intranet zone and allow authentication to the intranet zonewindowsAuthentication enabled=true
and both negotiate
and NTLM
providers in applicationhost.config
(both in IIS Express folder and solution .vs
folder)AuthenticationDisplayName = Windows
and AutomaticAuthentication = true
in the app builderNothing of these helped so far and I need to put in the credentials regardless the browser used (Chrome/Edge).
If I cancel the credential request, I get 401.2 - Unauthorized
, You are not authorized to view this page due to invalid authentication headers.
How could I get rid of it and get authenticated properly using the Windows auth?
Upvotes: 2
Views: 1873