Search code examples
c#asp.net-corepleskplesk-onyx

Error trying to host an ASP.NET 2.2 Website on Plesk Onyx 17.8.11 - HTTP Error 500.0 - ANCM In-Process Handler Load Failure


I'm attempting to host a ASP.NET 2.2 Website on a interserver.com shared hosting platform. They are using Plesk Onyx version 17.8.11 as their hosting platform control panel.

I've verified the hosting is routed and setup correctly but still get the runtime error:

HTTP Error 500.0 - ANCM In-Process Handler Load Failure

  • 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.

HTTP Error 500.0 - ANCM In-Process Handler Load Failure I reported the issue to customer service and they have sent me a few articles of things to try but no solution has been found. Since the error says that the key aspnet core library could not be found, they said they have "installed .NET core 2.1.10 and 2.2.2 hosting bundle" but I'm still getting the same error.

The web.config on the host (auto-generated) is:

<?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=".\BridgeSite.dll" stdoutLogEnabled="false" stdoutLogFile=".\logs\stdout" hostingModel="InProcess" />
    </system.webServer>
  </location>
</configuration>
<!--ProjectGuid: 7bcb9c33-cd6b-4078-9742-869d5dd7bxxx -->

Any suggestions stackoverflow family?


Solution

  • Since this is a shared hosting platform I do not have access to fiddle around with server configurations. From what I can tell, something went wrong with the ASP.NET Core 2.2.4 runtime installation and AspNetCoreModuleV2.dll is missing/corrupt/misplaced?

    After spending far to much time on this I found a couple workarounds:

    1. Every time you publish, go to the folder on the host where the code was published, open the auto-generated web.config, under the handlers node replace "AspNetCoreModuleV2" with "AspNetCoreModule". This works, by defaulting it back to the previous package, but is crappy because it has to be done manually every time the code is published.

    OR,

    1. in the Visual Studio solution, open (or create new) publish profile under Properties > PublishProfiles. In the PropertyGroup add: <AspNetCoreHostingModel>OutOfProcess</AspNetCoreHostingModel>. This works but is a big hack and the application will not have all the performance gains of being InProcess (Default)

    After testing, I found you can use one or the other, you don't have to use both.

    I'm hoping this issue will resolve itself over time as the hosting service continues to update their runtimes, but for now hopefully those workarounds will help you too.