2

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?

Easton James Harvey
  • 1,672
  • 1
  • 14
  • 24

4 Answers4

3

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.

Easton James Harvey
  • 1,672
  • 1
  • 14
  • 24
1

This error is documented, along with the solution:

500.0 In-Process Handler Load Failure

The worker process fails. The app doesn't start.

The ASP.NET Core Module fails to find the .NET Core CLR and find the in-process request handler (aspnetcorev2_inprocess.dll). Check that:

The most likely scenario is that you've failed to installed the .NET Core runtime at all or at least failed to install the correct version thereof to match what your project is targeting.

Community
  • 1
  • 1
Chris Pratt
  • 232,153
  • 36
  • 385
  • 444
  • Thank you for your insight, however, I'm not sure you read the problem specifically, "I'm attempting to host a ASP.NET 2.2 Website on a interserver.com shared hosting platform". I don't have direct access to the server to install any .net core runtimes. – Easton James Harvey Apr 17 '19 at 21:01
  • Then you're probably out of luck. Unless the shared hosting provider has installed the runtime and keeps it up to date, you can't host there. Honestly, just get a real host. Shared hosting is a scam. You can get a full VPS for $5/mo some places. – Chris Pratt Apr 17 '19 at 22:18
  • $5/mo sounds like a great deal for a full VPS... where do you recommend? – Easton James Harvey Apr 18 '19 at 02:29
  • 1
    I use DigitalOcean. It's one of their smallest VPS, but it's perfectly sufficient for my blog and a few other personal projects. – Chris Pratt Apr 18 '19 at 10:29
  • 2
    @Easton James Harvey I also received same error message like you experienced above on my hosting provider (asphostportal.com). Just make sure you ask your provider to change to No Managed Code, it will work. – Mark Spencer May 16 '19 at 05:58
  • adding Microsoft.AspNetCore.Server.IIS actually worked for me. cheers – Deadlykipper Apr 09 '20 at 18:12
0

For Asp.Net Core 2.2 MVC. 1. Create web.config at the root on the Project. 2. Past this configuration:

  <?xml version="1.0" encoding="utf-8"?>
  <configuration>
    <location path="." inheritInChildApplications="false">
      <system.webServer>
        <handlers>
          <add name="aspNetCore" path="*" verb="*" modules="AspNetCoreModule" resourceType="Unspecified" />
        </handlers>
        <aspNetCore processPath="dotnet"
                    arguments=".\MyApp.dll"
                    stdoutLogEnabled="false"
                    stdoutLogFile=".\logs\stdout"
                    hostingModel="InProcess" />
      </system.webServer>
    </location>
  </configuration>
0

I was having the same issue with Interserver.com.

Support was able to solve the problem by switching my application pool to 64 bit. From what I have read in regards to other Plesk hosting providers is that by default the scripts that create your virtual machine by default create the application pool in 32 bit. I'm guessing that AspNetCoreModuleV2 requires 64 bit, but that is just a guess. Happy that my site is running in process now.

Frank B
  • 73
  • 1
  • 8