Discover how to fix the “HTTP Error 500.0 – ANCM In-Process Handler Load Failure” in Plesk. Our experienced Plesk Support team is ready to assist.
How to Fix “HTTP Error 500.0 – ANCM In-Process Handler Load Failure”
Deploying an ASP.NET Core application via Plesk on a Windows server can sometimes throw this error:
HTTP Error 500.0 – ANCM In-Process Handler Load Failure.
Luckily for you, our Experts are here to help out.
This error typically indicates a failure to start the application with the in-process hosting model under IIS. At its core, it means that the ASP.NET Core Module (ANCM) couldn’t load or initialize the app. The most common causes are missing dependencies, misconfigured settings, or platform mismatches.
Today, we will explore the root causes of this issue and how to resolve them.
What Causes This Error?
Here are the most common culprits behind the ANCM In-Process Handler Load Failure:
- The specified version of `Microsoft.NetCore.App` or `Microsoft.AspNetCore.App` is not installed on the server.
- The in-process request handler (`Microsoft.AspNetCore.Server.IIS`) is missing or not properly referenced in your application.
- ANCM could not locate the `dotnet` executable.
- Hosting model or architecture conflicts (32-bit vs. 64-bit).
- Missing configuration files such as `web.config`.
If you’re working with multiple components on a Plesk server, it’s also important to ensure related services like MariaDB are running correctly. Learn how to fix the “Plesk failed to start MariaDB” issue here.
How to Fix the Error
Before we begin, start by checking the Event Viewer on your server. Look for relevant error messages in the Application and System logs. They often give us an idea of what went wrong during the startup.
1. Enable stdout Logging
Enable `stdout` logging to capture detailed startup messages with these steps:
- Locate or create the `web.config` file in the root of the project.
- Then, modify the <aspNetCore> section to enable logging:
<aspNetCore processPath="dotnet"
arguments=".\MyApp.dll"
stdoutLogEnabled="true"
stdoutLogFile=".\logs\stdout"
hostingModel="InProcess" />Make sure to create a `logs` folder in the app directory and ensure it has write permissions.
Having proper logging in place also helps during other Plesk-level troubleshooting. For example, when managing backups via CLI, logs are invaluable. Here’s how you can manage Plesk backups from the command line.
2. Match Application Pool Architecture
If the app targets a 64-bit environment, make sure the IIS Application Pool is also set to run in 64-bit mode:
- First, go to IIS Manager > Application Pools.
- Then, right-click the app pool and click Advanced Settings.
- Now, set Enable 32-Bit Applications to `False`.
This simple switch resolves architecture mismatches that often trigger this error.
3. Try Switching to Out-of-Process Hosting
If InProcess hosting fails consistently, switch to OutOfProcess mode:
- Open or create a publish profile in `Properties > PublishProfiles`.
- Then, add the following setting inside the <PropertyGroup>:
<AspNetCoreHostingModel> OutOfProcess</AspNetCoreHostingModel>
However, this fix can affect the performance benefits of in-process hosting.
4. Add or Correct the web.config File
Especially for ASP.NET Core 2.2 apps, ensure the `web.config` is correctly set up:
<?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>
You can also make server-wide configuration adjustments using tools like Plesk bin. Learn how to use Plesk bin server_pref to tweak server preferences.
5. Try These Tips if Publishing to Azure
If the application works locally but fails after publishing to Azure App Services, do the following:
- Add a `web.config` file if it’s missing.
- Ensure the `logs` folder and `stdout.log` file exist under `wwwroot/logs`.
- Make sure the latest .NET version (e.g., .NET 8) is installed.
- Double-check for any missing dependencies like npm packages or third-party frameworks.
- Use Azure’s App Service Diagnostics and Application Event Logs for deeper insights.
If you’re running a modern front-end stack, consider checking our guide to setting up Next.js on Plesk to avoid common pitfalls during deployment.
[Need assistance with a different issue? Our team is available 24/7.]
Conclusion
The HTTP Error 500.0 – ANCM In-Process Handler Load Failure in Plesk is a common hurdle when deploying ASP.NET Core apps, especially when transitioning between environments or using newer .NET runtimes.
This guide, created by our Support Engineers, shows how to fix the “HTTP Error 500.0 – ANCM In-Process Handler Load Failure” in Plesk.