I followed the documentation here as best as I could.
I've updated the startup blazorHub() and MapFallbackToPage() endpoints
If I browser to existing razor Page ClientDashboard.cshtml and have it load the component the blazor page will load and function. So I know my blazor.js is loading correctly
@(await @Html.RenderComponentAsync<Components.ClientDashboard.ClientManagement>(RenderMode.Server, new{clientId = @Model.ClientID}))
But I'm not wanting to bypass this and just actual routing to navigate to my blazor pages localhost.com/ClientDashboard/42 for example.
But I'm currently getting page error when trying to browse to https://localhost:5001/TestRouting page
I'm unsure what I'm missing or how to debug this and guidance would be appreciated!
Update I tried PMC suggestion but got different error page came up blank with this error in browser tools
Update 2
Moved all files into the Pages directory just in case there was an issue with the locations. Also tried a few versions of the host.cshtml
still, get null reference exception either directly on the page or in the console of the browser.
CodePudding user response:
Try change
<Router AppAssembly="typeof(App).Assembly">
to this in your App.Razor file
<Router AppAssembly="typeof(Program).Assembly">