I am trying to create a Blazor app for use on a website. Most of the website will be static, and I would like this part to be served from static HTML files for client-side performance reasons. A few of the website’s pages will be rendered by the Blazor application. When prototyping this, I ran into a problem: when navigating away from the Blazor part back to the static part of the website, I get “Error: System.InvalidOperationException: 'Router' cannot find any component with a route for '/index.html'.”
The link to index.html is in the body tag of the page which contains the app, but outside of the app tag and it should be outside of Blazor’s attention. I understand that the cause of the problem is that the router can’t find the component for the route, but why is Blazor trying to find the component instead of just letting the browser to navigate away to a non-Blazor page? This link should be handled by the browser, not Blazor, I would have thought?
NavigateTo(string uri, bool forceLoad)that will do a "real" navigation, so a request will be made to the server. As long as your server returns the page you want, that should do what you want.