0

I have 2 projects (Blazor and a Web API) that I would like to deploy to same Azure Web App Service. However I am having some difficulties getting them running correctly after deployment. Deployment pipeline

I am deploying the Web Api project under /api virtual directory.

I can see related files for both projects are deployed properly in the logs logs1

log2

I also looked at the files under the Azure Debug Console and can see my dlls, deployed under _framework for the Blazor app and under api folder for the Web api. api deployed files

When I navigate to my application url, I can see my blazor application running, however anything under /api folder is still getting treated like part of the Blazor app and I cant call my controller actions. web api not called It feels like I am missing a handler, but not sure how to add that.

Mustafa
  • 176
  • 3
  • 13
  • App services are for individual applications, not multiple applications. If you want to run multiple applications, you need to use multiple app services. – Daniel Mann Apr 11 '22 at 18:14
  • I saw other people people doing it here, https://stackoverflow.com/questions/59443304/how-to-host-multiple-applications-in-the-same-azure-web-app-service – Mustafa Apr 11 '22 at 18:29

1 Answers1

0

Is there any reason why you should use the same app service? For these are two separate applications so you should be separating these in two different app services. If you're interested to use Blazor WASM and use an API as a backend, you might want to take a look at Azure Static Web Apps where your Blazor WASM app can use an integrated Azure Function and use the same Github Actions pipeline.

Raffy
  • 515
  • 1
  • 8
  • 12