Windows Authentication with Blazor Server

Falanga, Rod, DOH 150 Reputation points
2024-09-04T14:31:54.3166667+00:00

Where I work all applications must use Windows Authentication. So, that's what we've done for years.

I am working on learning Blazor using .NET 8. I had hoped that I could use Windows Authentication with the Blazor Server App template. I am aware of the fact that Microsoft advises against using Windows Authentication in a Blazor WebAssembly application, because of that I want to use the Blazor Server App template. So, I'm not going to use a Blazor WebAssembly template, even with the Blazor Web App template. Yet, Visual Studio 2022 still doesn't allow me to use Windows Authentication with when specify server only.

So, here are my questions. Will Microsoft ever allow developers to use a Blazor Server app with Windows Authentication either now or in the future? Or is it the case that if I have to use Windows Authentication, then I have to give up on using Blazor?

ASP.NET Core
ASP.NET Core
A set of technologies in the .NET Framework for building web applications and XML web services.
4,515 questions
Blazor
Blazor
A free and open-source web framework that enables developers to create web apps using C# and HTML being developed by Microsoft.
1,556 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Bruce (SqlWork.com) 64,161 Reputation points
    2024-09-04T15:21:33.8133333+00:00

    Windows authentication works with server blazor. There is just no template. manually configure as you would mvc or razor.

    https://video2.skills-academy.com/en-us/aspnet/core/security/authentication/windowsauth?view=aspnetcore-8.0&tabs=visual-studio


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.