How to fix error “ANCM In-Process Handler Load Failure”?

后端 未结 16 2808
攒了一身酷
攒了一身酷 2020-12-13 17:39

I\'m setting up the first site in IIS on Windows Server 2016 Standard. This is a NET Core 2.2 application. I cannot get the site to show.

I am getting th

相关标签:
16条回答
  • 2020-12-13 18:00

    Open the .csproj file and under Project > PropertyGroup > AspNetCoreHostingModel, change the value “InProcess” to “OutOfProcess”.

    <PropertyGroup>
    <TargetFramework>netcoreapp2.2</TargetFramework>
    <AspNetCoreHostingModel>OutOfProcess</AspNetCoreHostingModel>
    

    0 讨论(0)
  • 2020-12-13 18:00

    Change platform target to Any CPU.

    Change platform target to Any CPU

    0 讨论(0)
  • 2020-12-13 18:02

    I'm also getting "HTTP Error 500.0 - ANCM In-Process Handler Load Failure"

    Except in my case...Everything was running great until I got the Blue Screen of Death.

    I have a solution with two startup projects.
    One is an API (that comes up) and the other is a WebApp(which gets the error). Both are .NET Core 3.1..also VS2019.

    First I tried setting a break point in Main() of program.cs...it never got this far.

     public static void Main(string[] args)
     {
         CreateHostBuilder(args).Build().Run();
     }
    

    On a hunch...I Looked at the NuGet packages installed. I uninstalled and (re)installed

    Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation(3.1.6)
    

    ...and now its working again.

    0 讨论(0)
  • 2020-12-13 18:03

    For more info, in web.config, set

    stdoutLogEnabled="true"
    

    then check the logs folder. In my case it had nothing to do with project, publishing or hosting settings - it was my fault for not copying a file essential to my app. The error was simply "Could not find file "D:\Development\IIS Hosting Test\filename.ext"

    0 讨论(0)
  • 2020-12-13 18:04

    I had the same issue in .Net core 2.2. When I replace

    web.config:

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

    to

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

    then it works fine.

    Note: The same solution also works for .Net core 2.2 and other upper versions as well.

    0 讨论(0)
  • 2020-12-13 18:05

    I had the same error.

    According to Microsoft(https://dotnet.microsoft.com/download/dotnet-core/current/runtime), We should install the 'ASP.NET Core Hosting Bundle' in our hosting server.

    'The ASP.NET Core Hosting Bundle includes the .NET Core runtime and ASP.NET Core runtime. If installed on a machine with IIS it will also add the ASP.NET Core IIS Module'

    After I did, The 'AspNetCoreModuleV2' installed on my server and everything works well. It didn't need to change your 'web.config' file.

    0 讨论(0)
提交回复
热议问题