'IIS Blazor App (Intranet) require entering Windows Credentials
I have a couple of .NET 5.0 Blazor applications deployed to IIS 10 on a Windows Server for intranet traffic. These applications have Windows Auth enabled and allowed the user to view the site with their Windows Credentials, which would automatically be passed to the Blazor site (ie. it could show them their domain account information). Recently, without changing anything on IIS or related to any configuration, the sites started asking users to manually enter their Windows Credentials, which shouldn't be happening.
I created a new Blazor app and deployed the scaffolded app to IIS, and this didn't require entering Windows Credentials. I also then migrated the existing code to the scaffolded app to test what may be the root cause, and kept deploying the changes to IIS incrementally. I eventually had the entire codebase moved to the scaffolded app, and it still worked without requiring credentials. We have our applications deployed under the Default Web Site, so I then removed the old application and created a new one, and it started asking for credentials again.
Does anyone have an idea of what might be the cause of this?
- Windows Auth is enabled for the project.
- Windows Auth is enabled on IIS
services.AddRazorPages();
services.AddServerSideBlazor();
services.AddSignalR(e => {
e.MaximumReceiveMessageSize = 65536;
});
services.AddAuthentication(IISDefaults.AuthenticationScheme);
services.AddAuthorization();
...
app.UseHttpsRedirection();
app.UseStaticFiles();
app.UseRouting();
app.UseAuthentication();
app.UseAuthorization();
Solution 1:[1]
(Old question, but I thought I'd take a shot...)
Have you tried adding that site to your computers trusted sites in the internet options?
Go to Internet Options --> Trusted Sites --> Sites and enter the full URL including https://
https://www.groovypost.com/howto/add-trusted-sites-in-the-windows-10-control-panel/
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 |
