Edit

Host and deploy ASP.NET Core standalone Blazor WebAssembly with Azure Static Web Apps

Note

This isn't the latest version of this article. For the current release, see the .NET 11 version of this article.

This article explains how to host and deploy standalone Blazor WebAssembly with Microsoft Azure Static Web Apps.

App configuration

To ensure that requests for any path return index.html, set a navigation fallback route.

Create a file named staticwebapp.config.json in the project's root folder with the following content:

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

Deploy from Visual Studio

To deploy a standalone Blazor WebAssembly app from Visual Studio:

GitHub deployment scenarios