本文介绍了如何修复错误“ANCM In-Process Handler Load Failure"?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在 Windows Server 2016 Standard 上的 IIS 中设置第一个站点.这是一个 NET Core 2.2 应用程序.我无法显示该网站.

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.

我收到此错误:

HTTP 错误 500.0 - ANCM 进程内处理程序加载失败

我可以更改什么来清除此错误并显示我的网站?

What can I change to clear this error and get my site to display?

我的应用程序是一个 dll.

My application is a dll.

我通过命令提示符在服务器上测试了我的应用程序

I tested my application on the server through the Command Prompt with

dotnet ./MyApp.dll

它显示在浏览器中,但只显示在服务器上,带有 (localhost:5001/).

it displays in the browser but only on the server itself with (localhost:5001/).

使用此方法无法从任何其他服务器访问该站点.当我通过 IIS 设置站点时,我在服务器和尝试访问该站点的服务器上都收到了 In-Process 错误.

Using this method the site cannot be accessed from any other server.When I set up the site through IIS, I get the In-Process error both on the server and from servers attempting to access the site.

起初我收到了 Out-Process 错误.我读到的东西说要将此(hostingModel =inprocess")添加到我的 web.config所以我做了,但现在我收到了处理中错误.

At first I was receiving the Out-Process error. Something I read said to add this (hostingModel="inprocess") to my web.configso I did but now I receive the In-Process error.

该站点安装在我的开发服务器上后运行良好.

The site works fine when installed on my development server.

IIS AspNetCore 模块 V2"的事件查看器显示此错误:

The Event Viewer shows this error for "IIS AspNetCore Module V2":

无法启动应用程序/LM/W3SVC/2/ROOT",错误代码0x8000ffff".

这是我的web.config:

<?xml version="1.0" encoding="utf-8"?>
    <configuration>
  <system.web>
    <customErrors mode="RemoteOnly"></customErrors>
        <identity impersonate="false" password="****" userName="****" />
  </system.web>
  <system.webServer>
    <handlers>
      <add name="aspNetCore" path="*" verb="*" modules="AspNetCoreModuleV2" resourceType="Unspecified" />
    </handlers>
    <aspNetCore processPath="dotnet" arguments=".MyApp.dll" stdoutLogEnabled="false" hostingModel="inprocess" stdoutLogFile=".logsstdout" forwardWindowsAuthToken="false">
      <environmentVariables />
    </aspNetCore>
  </system.webServer>
</configuration>

推荐答案

我在 .Net core 2.2 中遇到了同样的问题.当我更换

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>

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

然后它工作正常.

注意:同样的解决方案也适用于 .Net core 2.2 和其他更高版本.

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

这篇关于如何修复错误“ANCM In-Process Handler Load Failure"?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

05-24 12:01