.NET 9 - Blazor Web App - Global Server Rendering with Individual Accounts not working #58967
Closed
1 task done
Labels
area-blazor
Includes: Blazor, Razor Components
✔️ Resolution: Duplicate
Resolved as a duplicate of another issue
Status: Resolved
Is there an existing issue for this?
Describe the bug
Just created a brand new Blazor Web App (Global Server Render Mode) project, but i found that both the Login and Register page (in general every page that uses Identity) does not work correctly as there is no User after the login.
Only if i do a full page refresh, then the authentication wires up and starts working again.
Expected Behavior
The NavigationManager correctly works as the current RenderMode is set to null in the App.razor
Steps To Reproduce
Spin un a brand new Blazor Web App with the following project creation settings:
And you will get this exception right after the login (or registration), when the IdentityRedirectManager tries to redirect you to the next page (IdentityRedirectManager.cs:31)
Exceptions (if any)
Microsoft.AspNetCore.Components.NavigationException
HResult=0x80131500
Message=Exception of type 'Microsoft.AspNetCore.Components.NavigationException' was thrown.
Source=Microsoft.AspNetCore.Components.Server
StackTrace:
at Microsoft.AspNetCore.Components.Server.Circuits.RemoteNavigationManager.NavigateToCore(String uri, NavigationOptions options)
at Microsoft.AspNetCore.Components.NavigationManager.NavigateToCore(String uri, Boolean forceLoad)
at Microsoft.AspNetCore.Components.NavigationManager.NavigateTo(String uri, Boolean forceLoad, Boolean replace)
at TestAuth.Components.Account.IdentityRedirectManager.RedirectTo(String uri) in C:\my\work\cdesign\repo\HyperionNext\TestAuth\Components\Account\IdentityRedirectManager.cs:line 31
at TestAuth.Components.Account.IdentityRedirectManager.RedirectTo(String uri, Dictionary`2 queryParameters) in C:\my\work\cdesign\repo\HyperionNext\TestAuth\Components\Account\IdentityRedirectManager.cs:line 40
at TestAuth.Components.Account.Pages.Register.d__12.MoveNext() in C:\my\work\cdesign\repo\HyperionNext\TestAuth\Components\Account\Pages\Register.razor:line 96
at Microsoft.AspNetCore.Components.ComponentBase.d__30.MoveNext()
.NET Version
9.0.100
Anything else?
Visual Studio 2022 17.12.0
Host:
Version: 9.0.0
Architecture: x64
Commit: 9d5a6a9aa4
The text was updated successfully, but these errors were encountered: