Blazor Server-side doesn't start with Windows Authentication on Chrome
See original GitHub issueDescribe the bug
The server-side Blazor application doesn’t start when the authentication is set to Windows Authentication in Google Chrome. Creating an application without authentication works fine.
To Reproduce
Steps to reproduce the behavior:
- Create a new Blazor server-side application with Windows Authentication
- Start the application in IIS Express and open the application in Chrome.
- You’ll see the pre-rendered page and in the top-right the username of the current Windows user is shown:
Hello, DOMAIN\user!
. - Go to the page ‘Counter’.
- When you try to click the button ‘Click me’, nothing happens.
Additional context
I’ve tested in the following browsers with Windows Authentication enabled:
Browser | Is working? |
---|---|
Chrome | No |
Internet Explorer | Yes1 |
Edge | Yes |
FireFox | Yes |
1 IE only works with https://github.com/Daddoon/Blazor.Polyfill added.
Some points that I found that might be handy:
- By removing the line
Html.RenderStaticComponentAsync<App>()
in_Host.cshtml
you’ll notice that the page is white. The content that you see is pre-rendered. - Chrome and Internet Explorer does authenticate automatically but FireFox and Edge does not
(I need to provide my username and password). - In Chrome, the WebSocket connection is established:
but no data was sent:
- In FireFox everything works fine:
> dotnet --info:
.NET Core SDK (reflecting any global.json):
Version: 3.0.100-preview8-013656
Commit: 8bf06ffc8d
Runtime Environment:
OS Name: Windows
OS Version: 10.0.17763
OS Platform: Windows
RID: win10-x64
Base Path: C:\Program Files\dotnet\sdk\3.0.100-preview8-013656\
Host (useful for support):
Version: 3.0.0-preview8-28405-07
> Visual Studio:
Microsoft Visual Studio Enterprise 2019 Preview
Version 16.3.0 Preview 2.0
> IIS
IIS Express 10.0.18362.1
> Google Chrome
Version 76.0.3809.132 (Official Build) (64-bit)
Issue Analytics
- State:
- Created 4 years ago
- Comments:8 (2 by maintainers)
Top Results From Across the Web
I have a Blazor server app with windows authentication. ...
Open IIS Manager, select the Blazor server app, and go to the Authentication settings.
Read more >Server side Blazor, how do I enforce a login page that ...
I'm trying to use role based authorization with roles stored on the database and the roles for a user would be pulled from...
Read more >ASP.NET Core Blazor authentication and authorization
Blazor WebAssembly apps run on the client. Authorization is only used to determine which UI options to show. Since client-side checks can be ......
Read more >How to Build and Secure Web Applications with Blazor
Learn how to build client-side Web apps using Blazor and how to secure them with Auth0 authentication and authorization features.
Read more >Debug ASP.NET Core Blazor WebAssembly
Learn how to debug Blazor WebAssembly with browser developer tools and an integrated development environment (IDE).
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Reported in the Chromium bug tracker: https://bugs.chromium.org/p/chromium/issues/detail?id=998693
Thanks for information, @GerardSmit. Good to know. Hope this will help others in community too.