0

I have 1 MVC project and 1 API project under one solution hence both share the same static files and entities. I would like to host them in one app service.

Tried: I created 2 virtual directories in azure app service in Configuration>Path Mappings and published both projects in separate paths. Error: 503.35 ANCM Multiple In-Process Applications in same Process.

Next: I updated the hosting model to "OutOfProcess" in both project's .csproj file before publishing and in web.config file created by azure after publishing in kudu service. Error: HTTP Error 502.5 - ANCM Out-Of-Process Startup Failure

Next: I changed modules="AspNetCoreModuleV2" to modules="AspNetCoreModule" Error: 503 - Service unavailable

Version info: .NET Core version 5, .EF version 5, When Publishing the code.. Target framework: netcoreapp5, Deployment mode: framework dependent, Target runtime: portable, App service settings(runtime): x64 windows

Questions: Is there a way I can publish both in 1 app service without any issues mentioned above? Need solution for these issues/errors. (or) I should opt for 2 app services plan to host both projects in separate app service is the only solution??

Thanks!

Fazil
  • 1
  • 3

1 Answers1

1

You should uncheck Directory like below.

enter image description here

And the type of api should be application.

enter image description here

Tips:

  1. I remember we didn't need extra configuration, modifying OutOfProcess etc., none of that.

  2. We need to make sure that our publish file can be run. Of course, we can put it under IIS for testing.

  3. It should be noted that the main site cannot be a nodejs program, otherwise there will be problems with routing.

Related Post:

  1. How to deploy a Flask+React application to Azure Web Service

  2. How to publish two .net websites on one Azure WebApp?

Jason Pan
  • 15,263
  • 1
  • 14
  • 29