简体   繁体   中英

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

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>

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM