Search code examples
azureblazorazure-web-app-serviceprogressive-web-appsblazor-webassembly

How do I configure Azure App Service to pass API calls to my controllers from my Blazor PWA?


I've deployed a Blazor Web Assembly PWA to an Azure App Service. I'm using the hosted model with the default Client, Server and Shared projects.

Calls to my API controllers work fine in my dev environment, but not on the Azure App Service. All calls to my /api endpoints get redirected back to the PWA with a default "Sorry, there's nothing at this address." message for an unmatched route.

How do I configure my application to pass the API calls to my controllers?

This app was deployed via Azure Pipeline CI if that makes any difference at all.


Solution

  • I had my continuous integration configured to deploy my "Client" project and not the "Server" project. Once I configured it to deploy the "Server" project, things started working.