How to properly host Blazor WebAssembly App for Static Hosting -- including web.config

Viewed 206

I'm testing out Blazor WebAssembly and I'm hung up on one detail of deployment. I'm using the VS 2019 sample app, and deploying it to Firebase Hosting. It works, for the most part, but I can't figure out how the auto-generated web.config file should fit in.

When I publish the app to a local folder (call it dist), the contents are one file (web.config) and one wwwroot subfolder (where everything else goes, including index.html). If I deploy the entire dist folder, as expected the website cannot load on the internet because there is no index.html in the root. Conversely, if I deploy just the wwwroot folder, it can be loaded via the internet, but since the web.config file is missing, I get some issues with pages loading. I'm assuming that's because the rewrites contained within web.config are missing.

So my ultimate question is, when hosting in a non-IIS environment like Firebase, where or how does the web.config file, or its contents integrate?

0 Answers
Related