HTTP Error 500.35 - ANCM Mulitple In-Process Applications in same Process - AspNetCoreModule" vs "AspNetCoreModuleV2

AzureSDE 116 Reputation points
2020-10-21T20:16:02.47+00:00

I have deployed a web api (.netcore 3.1) into our Azure. The app has 2 virtual apps running under the same app service. Both sub apps are using hosting model "In-Process".

When I attempt to access any of the sub apps, the following error is displayed.

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

After some research, we changed the handler in both web.config files to use "AspNetCoreModule" instead of "AspNetCoreModulev2" and both sub apps appeared to be up and running.

My question is: What are the impacts/issues with using "AspNetCoreModule" instead of "AspNetCoreModuleV2" on netcore3.1 web appi app?

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

Accepted answer
  1. Ryan Hill 28,286 Reputation points Microsoft Employee
    2020-10-22T16:46:31.683+00:00

    Hi @AzureSDE ,

    To answer your question, only AspNetCoreModuleV2 supports the IIS In-Process hosting model for ASP.net Core; therefore, you should really be using V2 with your, I'm assuming, Windows hosted app.

    If I may ask, what lead you to rolling back to AspNetCoreModule? Did you have any logs that you can share? If not, you can enabling them adding aspNetCore to <system.webServer> in your web.config files

    <aspNetCore processPath="dotnet" arguments=".\yourwebapp.dll" stdoutLogEnabled="true" stdoutLogFile="\\?\$home$\Logfiles\stdout" />  
    

    Regards,
    Ryan


1 additional answer

Sort by: Most helpful
  1. AzureSDE 116 Reputation points
    2020-10-22T19:21:55.653+00:00

    We had to use 'AspNetCoreModule' because 'AspNetCoreModuleV2' would not allow us to host multiple sub-apps on the same app service. The error we were seeing was 'HTTP Error 500.35 - ANCM Mulitple In-Process Applications in same Process'.

    Below are our current <system.webServer> section for both sub-apps on netcore3.1. These also worked when we were on netcore2.2.

    App1:

    <system.webServer>
        <handlers>
          <remove name="aspNetCore" />
          <add name="aspNetCore" path="*" verb="*" modules="AspNetCoreModule" resourceType="Unspecified" />
        </handlers>
        <security>
          <requestFiltering>
            <requestLimits maxQueryString="65536" />
          </requestFiltering>
        </security>
        <aspNetCore processPath=".\SubApp1.exe" stdoutLogEnabled="true" stdoutLogFile=".\logs\stdout" hostingModel="InProcess" />
      </system.webServer>
     
    

    App2:

    <system.webServer>
        <handlers>
          <remove name="aspNetCore" />
          <add name="aspNetCore" path="*" verb="*" modules="AspNetCoreModule" resourceType="Unspecified" />
        </handlers>
        <security>
          <requestFiltering>
            <requestLimits maxQueryString="65536" />
          </requestFiltering>
        </security>
        <aspNetCore processPath=".\SubApp2.exe" stdoutLogEnabled="true" stdoutLogFile=".\logs\stdout" hostingModel="InProcess" />
      </system.webServer>
    

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.