.NET 7.0 Exceptions with Blazor Server when Logging In/Out

Feature: 2 delayed exceptions occur with .NET 7 and Blazor Server using Auth0.

Description: Using the QuizManager as the demo application which is currently built with .NET 6, when you login or out, no exceptions occur after waiting a predetermined amount of time (anywhere from 30 seconds up to 2 minutes). However, when upgrading the application to use .NET 7, you will receive 2 delayed exceptions (anywhere from 30 seconds to 2 minutes after the action) as follows:

fail: Microsoft.AspNetCore.Components.Server.Circuits.RemoteNavigationManager[4]
Navigation failed when changing the location to https://localhost:7060/login?redirectUri=/
System.Threading.Tasks.TaskCanceledException: A task was canceled.

The 2nd exception occurs at the same time - this almost looks like something isn’t configured right with .NET.
fail: Microsoft.AspNetCore.Components.Server.Circuits.CircuitHost[111]
Unhandled exception in circuit ‘9QvE4WOFQi9O_SlUhE_NnEt8TCb7pVIB3LP5svcvGv8’.

Use-case: This was discovered while creating a .NET 7.0 Blazor Server application. Once changed to .NET 6, the exceptions did not occur. This appears to be an issue with the .NET Framework and not Auth0 as it appears to be auto redirecting after a specified amount of time. To see the behavior, download the Quiz Manager demo application, run it as .NET 6, login and wait for up to 2 minutes. Look in the console for the exceptions as nothing will appear in the interface or browser console. Change the application to use .NET 7 and perform the same actions and you will see 2 exceptions as specified above.

Hi @MountainTopTech,

Would this request be more appropriate in our Help category? I’m a bit lost in the nuance here, is this a feature request or you’re asking for help with a bug?

Also, links to the resources you’re referencing would be very helpful (i.e. quiz manager app, etc.)

Thanks!

Hi Dan,

I’ve had a very long support ticket over the last few months regarding this issue and was told to post this in the feedback section of the community by Pia Cherni. I don’t feel like there is a solution to this problem since it appears to be Microsoft related so this might just be a thread for general awareness of the issue. If you feel like it needs to be in the Help category, let me know but would hate to rehash the details of my ticket.

Here are a few links that were used.

This is the actual blog post where it dicusses how to build a Blazor app with authentication:
https://auth0.com/blog/what-is-blazor-tutorial-on-building-webapp-with-authentication/

Here is the GitHub repository that contains the QuizManager code used in the blog post:
https://github.com/auth0-blog/blazor-quiz-manager

Thanks,
Greg

1 Like

I see, and thank you for elaborating. I appreciate you taking the time to share this with the rest of the community. If there’s anything I can do please don’t hesitate to reach out.