Quantcast
Channel: Active questions tagged blazor - Stack Overflow
Viewing all articles
Browse latest Browse all 4839

Enabling a fallback page with a blazor wasm + server to get page reload and deep linking working

$
0
0

My application loads just fine and all the pages work as expected, but if I click refresh on a page (especially helpful in debugging), my application throws an exception. The exception doesn't matter since it seems to change by page, but I believe it is related to this:

https://learn.microsoft.com/en-us/azure/static-web-apps/deploy-blazor

Now I'm not currently deployed as a static web app in production, but even when debugging locally this isn't working. I've added a staticwebapp.config.json file to both the root of my Wasm project as well with the following content, but neither my server not client project have an index.html file. I'm unsure if this format will work given my project structure. I'm not even sure if my project is attempting to use the staticwebapp.config.json file since I don't see it change behavior at all since adding it.

{"navigationFallback": {"rewrite": "/index.html"    }}

I have an App.razor file in my server project, a bunch of authentication razor pages in the server and then a bunch of razor pages/components in my wasm client project. The project was created initially from a MudBlazor project template. Happy to provide more info on the project structure if this will help.

I'm unsure of where to go from here. It isn't the end of the world but I'd certainly like to have deep linking and page reload be working for the site.


Viewing all articles
Browse latest Browse all 4839

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>