<Router> is not working as expected in Blazor 8 #52143
Unanswered
AspNetWebDev
asked this question in
Q&A
Replies: 1 comment
-
I just posted about the same issue, I think they took out the NotFound fragment so they may have done away with the others you are having a problem with. I just had to figure out another solution, you can read about it here: #48983 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I have a working Blazor 7 WASM app . It has the following
<Router>
code inApp.razor
file :I moved the same app in Blazor 8 Interactive Web Assembly and added the above code in the
Routes.razor
component in the Server project (that is, project without .client). But above code doesn't work anymore.For example, all the app components that have
[Authorize]
attribute now throw 401 error instead of showing the<NotAuthorized>
section above.Similarly, navigating to a wrong URL doesn't display the
<NotFound>
section.This works perfectly as expected in Blazor 7 but not working in Blazor 8. My Blazor 8
Routes.razor
is given below :I also tried wrapping the whole
<Router>
inside<CascadingAuthenticationState>
but still problem persists.What might be the problem? Where do I need to fix?
Please help.
Beta Was this translation helpful? Give feedback.
All reactions