none
Aspnetcore deployment to App Service targeting .net framework cause error until AspNetCoreModuleV2 is switched back to AspNetCoreModule RRS feed

  • Question

  • I am finishing migrating of my project to Aspnetcore, but because of some legacy I can't yet target .Net Core. 

    1. Issue I found not much documentation about targeting .net framework.

    2. Major issue was that after deployment to App Service I got an error 500.2 

    it was fixed by adding 

          <AspNetCoreModuleName>AspNetCoreModule</AspNetCoreModuleName>
        <AspNetCoreHostingModel>OutOfProcess</AspNetCoreHostingModel>

    From my understanding issue is that AspNetCoreModuleV2 is not yet deployed to Azure, so I would love to see kind of status page is it deployed or not because other wise I spend so much time figuring our what is wrong with my deployment.

    Wednesday, January 2, 2019 11:27 AM

Answers

All replies

  • This should be working, I've tested today with an app using that setting. .Net Core 2.2 is deployed in all public datacenters (not for all ASEs though). 

    https://jebrook-webapp.azurewebsites.net/ 

    <?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=".\aspnetcoreapp.dll" stdoutLogEnabled="false" stdoutLogFile="\\?\%home%\LogFiles\stdout" hostingModel="InProcess" />
          </system.webServer>
      </location>
    </configuration>
    <!--ProjectGuid: 6c4c32d8-c6e5-4736-b219-c37dae79ceff-->


    Friday, January 4, 2019 3:12 AM
  • The problem is that I am targeting .Net Framework

    I've chnged my config to be 

    <?xml version="1.0" encoding="utf-8"?>
    <configuration>
      <location path="." inheritInChildApplications="false">
        <system.webServer>
          <handlers>
            <!--AspNetCoreModuleV2 switch back when its released on azure-->
            <add name="aspNetCore" path="*" verb="*" modules="AspNetCoreModuleV2" resourceType="Unspecified" />
          </handlers>
          <aspNetCore processPath=".\Flymark.Online.Web.exe" arguments="" stdoutLogEnabled="true" stdoutLogFile="../stdout" hostingModel="InProcess" />
        </system.webServer>
      </location>
    </configuration>

    And then I am getting error

    TTP Error 500.0 - ANCM In-Process Handler Load Failure

    Common causes of this issue:

    • The specified version of Microsoft.NetCore.App or Microsoft.AspNetCore.App was not found.
    • The in process request handler, Microsoft.AspNetCore.Server.IIS, was not referenced in the application.
    • ANCM could not find dotnet.

    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: <cite>https://go.microsoft.com/fwlink/?LinkID=2028526</cite>

    Wednesday, January 9, 2019 11:32 AM
  • I also posted this question heere https://stackoverflow.com/questions/54109762/aspnetcore-2-2-targetting-net-core-inprocess-fails-on-azure-app-service-with-e
    Wednesday, January 9, 2019 12:08 PM
  • Update

    So it looks like you have used the out of process option and it works based on your stackoverflow question. Have you looked at this issue which sounds somewhat similar since you are both using DevOps build pipelines.
    https://github.com/aspnet/AspNetCore/issues/6465

    Old response

    Take a look at this issue referenced here and see if maybe running the non-in process version of asp.net core 2.2 helps to help isolate.

    <handlers> <add name="aspNetCore" path="*" verb="*" modules="AspNetCoreModule" resourceType="Unspecified" /> </handlers>

    https://github.com/aspnet/AspNetCore/issues/6111#issuecomment-45129436

    Wednesday, January 9, 2019 3:39 PM
  • Thank you I found issue. So basically inprocess is not supported in .Net Framework targeting https://github.com/aspnet/Docs/issues/10297
    Thursday, January 10, 2019 2:24 AM