Closed mihaimyh closed 10 months ago
Hi @mihaimyh This is a duplicate of https://github.com/dotnet/aspnetcore/issues/52251 potentially more info also here https://github.com/dotnet/aspnetcore/issues/48983
@MariovanZeist is correct.
@javiercn @MariovanZeist Not Found is not working in Blazor Dotnet 8. I have added these line of Code:-
<NotFound>
<LayoutView Layout="@typeof(Layout.MainLayout)">
<h1>Not Found</h1>
</LayoutView>
</NotFound>
Please help me on this part.
Hi team I got the Solution:-
app.UseStatusCodePagesWithRedirects("/404");
app.Run();
Add a _404.razor page to your Pages folder.
@page "/404"
<h3>Show me 404</h3>
@code {
}
Dotnet 8 Web app Template
Is there an existing issue for this?
Describe the bug
Using the default template of Blazor with interactive mode set to auto (server and webassembly) we are getting the Routes.razor in the server project.
I've added also the component to display some pretty 404 page, but it seems it is not working, the browser's default 404 page is getting displayed:
Expected Behavior
No response
Steps To Reproduce
No response
Exceptions (if any)
No response
.NET Version
No response
Anything else?
No response