Deploying two APIs into single app service

Masali, Sangamesh 0 Reputation points
2023-09-24T12:42:07.6266667+00:00

Hi

I am deploying two APIs into single app service, my app service is running in B1 plan.

I am making changes into virtual path and physical path settings and deployed code through VS but after deploying I am getting below error message

HTTP Error 500.35 - ANCM Multiple In-Process Applications in same Process

Common solutions to this issue:

Select a different application pool to create another in-process application.

Troubleshooting steps:

  • Check the system event log for error messages
  • Enable logging the application process' stdout messages
  • Attach a debugger to the application process and inspect

For more information visit: https://go.microsoft.com/fwlink/?LinkID=2028526

Here are my changes done for deployment, Please suggest me where I am doing wrong

User's image

User's image

Azure App Service
Azure App Service
Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
7,638 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Konstantinos Passadis 19,066 Reputation points MVP
    2023-09-24T16:47:47.0166667+00:00

    Hello @Masali, Sangamesh !

    The error HTTP Error 500.35 - ANCM Multiple In-Process Applications in same Process occurs when you are trying to host multiple in-process ASP.NET Core applications in the same IIS Application Pool.

    I can suggest 2 possible solutions :

    I would check the Feature of Virtual Apps on Azure Web App :

    https://learn.microsoft.com/en-us/archive/blogs/tomholl/deploying-multiple-virtual-directories-to-a-single-azure-website

    From https://stackoverflow.com/questions/46130519/app-services-virtual-applications-and-directories :

    You could keep your web sites in separate projects and use the ‘virtual directories and applications’ settings in Azure to publish the two different projects under the same site.

    Goto web app -> Settings -> Application Settings -> Virtual applications and directories

    In Web Apps, each site and its child applications run in the same application pool. If your site has multiple child applications utilizing multiple application pools, consolidate them to a single application pool with common settings or migrate each application to a separate web app.

    ALSO

    Another possible solution could be to Change the hosting model of your ASP.NET Core applications to Out-of-Process.

    https://learn.microsoft.com/en-us/aspnet/core/host-and-deploy/iis/out-of-process-hosting?view=aspnetcore-7.0

    Out-of-process hosting model

    To configure an app for out-of-process hosting, set the value of the <AspNetCoreHostingModel> property to OutOfProcess in the project file (.csproj):

    XML

    <PropertyGroup>
      <AspNetCoreHostingModel>OutOfProcess</AspNetCoreHostingModel>
    </PropertyGroup>
    

    In-process hosting is set with InProcess, which is the default value.

    The value of <AspNetCoreHostingModel> is case insensitive, so inprocess and outofprocess are valid values.

    Kestrel server is used instead of IIS HTTP Server (IISHttpServer).

    For out-of-process, CreateDefaultBuilder calls UseIISIntegration to:

    • Configure the port and base path the server should listen on when running behind the ASP.NET Core Module.
    • Configure the host to capture startup errors.

    I hope this helps!

    Kindly mark the answer as Accepted and Upvote in case it helped!

    Regards

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.