I have an ASP.NET Core 6 MVC web app that I later added Windows authentication to using this guide from Microsoft's documentation.
Running the application on my local environment works like a charm - I am able to authenticate without being prompted for credentials and I can use authorization to secure actions and/or the controllers themselves.
HOWEVER, after publishing the site to the web server, I am prompted for my domain credentials. If I enter my credentials, I am authenticated and everything works as it should.
The guide states:
IIS Integration Middleware is configured to automatically authenticate requests by default.
But this does not seem to be the case in my experience. The associated link is also broken as it does not go to the right place.
It is my understanding that as long as the client and the server are on the same domain, then users should be automatically authenticated. I have verified that my computer & the server are both on the same domain by running this command:
systeminfo | findstr /B "Domain"
The web server also has "User Authentication" set to "Automatic logon only in Intranet zone."
My best guess is that the issue is the binding I setup in IIS. I am using the IP address so I can access the site from my local browser in the meantime for testing by a few users. Once the site goes live, will I stop being prompted? Or is there additional setup?
Some key details:
- ASP.NET Core 6 MVC intranet web app
- Added Windows authentication later on using Microsoft guide
- Windows Server 2019 Standard x64
- PC and Server on the same domain
- Windows authentication installed on server and enabled on IIS site
- Site binding = HTTP, server ip address, & port 8080 e.g. http://127.0.0.1:8080
- Internet options on server: User Authentication set to Automatic logon only in Intranet zone
- Internet Options on local: set by the administrator. Can't confirm what it's currently set to until I get a reply from the Help Desk.