-
Notifications
You must be signed in to change notification settings - Fork 10.5k
Description
When you try to navigate to another page by using the NavigationManager.NavigateTo in a blazor web app introduced in .net8,the following exception is thrown :
Microsoft.AspNetCore.Components.NavigationException: 'Exception of type 'Microsoft.AspNetCore.Components.NavigationException' was thrown.'
Even if you put the logic in a try/catch block,the exception would be still thrown and the page would stay on the current route.This means that if,for example,you wanted to create a login page that should take the user to the main page after a successful login form submission,the user would still stay on the login page!
Even though the issue had previously been brought up by @danroth27 at #49143 and closed as done later on,the problem still persists in the final version of .net8.I've also created a sample project that you can check out in the following repo:
Blazor Web App With Custom Cookie-based Authentication
Metadata
Metadata
Assignees
Labels
Type
Projects
Status