ASP.NET Core In-Process Hosting: Addressing HTTP Error 500.30
ASP.NET Core 2.2 introduced In-Process hosting within IIS, promising performance improvements. However, migrating existing projects, particularly ABP projects, can sometimes trigger the "HTTP Error 500.30 - ANCM In-Process Start Failure." This guide outlines the solution.
Understanding the Problem
The root cause often lies in missing prerequisites on the deployment server. IIS In-Process hosting demands two elements: the AspNetCoreHostingModel
element within the .csproj
file (set to "InProcess") and the AspNetCoreModuleV2
in web.config
. The absence of AspNetCoreModuleV2
is a common culprit. The solution involves either installing the .NET Hosting Bundle or switching to the Out-of-Process hosting model.
The Fix
The simplest solution is to revert to the Out-of-Process hosting model. Locate your .csproj
file and adjust the <PropertyGroup>
section as follows:
Incorrect (In-Process):
<code class="language-xml"><PropertyGroup> <TargetFramework>netcoreapp2.2</TargetFramework> <AspNetCoreHostingModel>InProcess</AspNetCoreHostingModel> </PropertyGroup></code>
Corrected (Out-of-Process):
<code class="language-xml"><PropertyGroup> <TargetFramework>netcoreapp2.2</TargetFramework> <AspNetCoreHostingModel>OutOfProcess</AspNetCoreHostingModel> <AspNetCoreModuleName>AspNetCoreModule</AspNetCoreModuleName> </PropertyGroup></code>
This change directs the application to use the standard AspNetCoreModule
, effectively resolving the 500.30 error. This ensures compatibility without requiring additional server-side installations. After making this change, rebuild and redeploy your application.
The above is the detailed content of HTTP Error 500.30: How to Resolve ASP.NET Core InProcess Hosting Failures?. For more information, please follow other related articles on the PHP Chinese website!