Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Deployed .Net Core 3.1 Web app on Azure shows error HTTP Error 500.35 - ANCM Multiple In-Process Applications in same Process

I've deployed a web application into our Azure, using the latest .net core 3.1 stack, the application is divided into 3 virtual apps running under the same Web app deployment and this is what seems to be causing the issue, as I can access the main application located on the root http://mywebapp/index.html but when I attempt to access any of the virtual paths IE: http://mywebapp/virtualapp/index.html the following error is displayed:

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. Specific error detected by ANCM: Only one in-process application is allowed per IIS application pool. Please assign the application '/LM/W3SVC/1848604257/ROOT/business' to a different IIS application pool. 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

Looking through the page referenced by Microsoft the information shown for this error is :

500.35 ANCM Multiple In-Process Applications in same Process The worker process can't run multiple in-process apps in the same process.

To fix this error, run apps in separate IIS application pools.

So my question is, Is there a way to work with multiple web applications deployed into virtual paths for a single web app in azure under .Net Core 3.1? Or is this a limitation on .Net Core 3.1 and apps are supposed to be deployed into separate web applications?

Thank you

like image 364
Armando Bracho Avatar asked Dec 09 '19 17:12

Armando Bracho


People also ask

What is ANCM failed to start?

500.32 ANCM Failed to Load dll The app doesn't start. The most common cause for this error is that the app is published for an incompatible processor architecture. If the worker process is running as a 32-bit app and the app was published to target 64-bit, this error occurs.

How do I troubleshoot Azure App Service?

To access App Service diagnostics, navigate to your App Service web app or App Service Environment in the Azure portal. In the left navigation, click on Diagnose and solve problems.


1 Answers

I ended up asking Microsoft about this error and how to resolve this on the Azure platform and they pointed out that the solution is to change your web application as well as any other virtual application deployed from "InProcess" hosting model to "OutOfProcess", you can find more information about what this means here but essentially to achieve this you need to add the following value to each project file (.csproj):

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

After deployment on Azure verify the change has taken place by validating that your web.config has the following settings:

<?xml version="1.0" encoding="utf-8"?>
<configuration>
  <location path="." inheritInChildApplications="false">
    <system.webServer>
      <handlers>
        <add name="aspNetCore" path="*" verb="*" modules="AspNetCoreModuleV2" resourceType="Unspecified" />
      </handlers>
      <aspNetCore processPath="dotnet"
                  arguments=".\MyApp.dll"
                  stdoutLogEnabled="false"
                  stdoutLogFile=".\logs\stdout"
                  hostingModel="OutOfProcess" />
    </system.webServer>
  </location>
</configuration>
like image 106
Armando Bracho Avatar answered Sep 28 '22 17:09

Armando Bracho