question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Blazor Server-side doesn't start with Windows Authentication on Chrome

See original GitHub issue

Describe 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:

  1. Create a new Blazor server-side application with Windows Authentication
  2. Start the application in IIS Express and open the application in Chrome.
  3. You’ll see the pre-rendered page and in the top-right the username of the current Windows user is shown: Hello, DOMAIN\user!.
  4. Go to the page ‘Counter’.
  5. 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:

  1. 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.
  2. Chrome and Internet Explorer does authenticate automatically but FireFox and Edge does not
    (I need to provide my username and password).
  3. In Chrome, the WebSocket connection is established: image but no data was sent: image
  4. In FireFox everything works fine: image

> 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:closed
  • Created 4 years ago
  • Comments:8 (2 by maintainers)

github_iconTop GitHub Comments

3reactions
GerardSmitcommented, Aug 28, 2019
2reactions
mkArtakMSFTcommented, Aug 29, 2019

Thanks for information, @GerardSmit. Good to know. Hope this will help others in community too.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found