Description
Is there an existing issue for this?
- I have searched the existing issues
Describe the bug
I create a Blazor web application via the Blazor Web App Template, then in the Blazor Server project add a Test component (set the rendermode as InteractiveServer
), after running the application and navigate to the Test page, firstly it will show the Test page content, after some seconds (2 or 3 seconds), it will auto display "Not Fount" in the page.
Expected Behavior
After redirecting to test page, it should stay on the test page instead of showing "Not Found".
Steps To Reproduce
-
Create a new Blazor application using the Blazor Web App Template.
In the Additional Information window, select the "Auto (Server and WebAssembly)" Interactive render mode and "Global" Interactivity location:
-
In the Server project, add a Testpage component in the Components/Pages folder, like this:
-
Running the application, navigate to the Test page, firstly the output as below:
then, a few seconds later, it will auto display "Not Found", like this:
Exceptions (if any)
No exceptions.
.NET Version
.net version: 8.0.403 and 9.0.100-rc.2.24474.11
Anything else?
I check it using the following version of VS 2022, both of them show the same issue:
Microsoft Visual Studio Community 2022 (64-bit) - Current Version 17.11.5
Microsoft Visual Studio Community 2022 (64-bit) - Preview Version 17.12.0 Preview 3.0
Besides, I also compare it with my old Blazor Web Application, it seems that this issue relate the Routes.razor component and the Layout content, in previous projects, these files are in the Server project, but now they are in the Client project.
If I add the Test component in the client project, or move the Routes.razor and Layout content from client project to the server project, it doesn't show the "Not Found" issue.