Skip to content

Authorization failed in Blazor server-side app #13124

@romandres

Description

@romandres

SDK: dotnet-sdk-3.0.100-preview8-013656-win-x64
IDE: Visual Studio 2019 16.3 Preview 2.0
OS: Windows 10 1903 (18362.1.amd64fre.19h1_release.190318-1202)

Using Windows Authentication, authorization in Blazor server-side app always results in NotAuthorized when using debug launch command 'Project' instead of 'IISExpress'.

Steps to reproduce using a new app:

  1. Create a new Blazor App in Visual Studio (Server-side, Windows Authentication)
  2. Debug the app using launch command 'IISExpress' -> The LoginDisplay component displays the Windows Username
  3. Debug the app using launch command 'Project' -> The LoginDisplay component displays nothing. The log contains this message: [Microsoft.AspNetCore.Authorization.DefaultAuthorizationService] Authorization failed.

Before updating to .NET Core 3.0 preview8 I was using preview7 where this was not an issue.
I have an existing app which I migrated from preview7 to preview8. The MVC part of the app and the authorization works while the Blazor server-side part always results in NotAuthorized if I don't use IISExpress to debug.

Metadata

Metadata

Assignees

Labels

✔️ Resolution: By DesignResolved because the behavior in this issue is the intended design.area-blazorIncludes: Blazor, Razor Componentsquestion

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions