IIS(执行此操作时出错)

IIS (There was an error while performing this operation)

我收到关于 web.config 的 There was as error while performing this operation 错误。我遵循以下配置:

  • OS is Windows server 2012 R2 with IIS version 8.5.

  • URL Rewrite 2.1 module is installed on the machine.

  • IIS_IUSRS has full access to the directory.

  • Application Initialization module is installed

  • .Net CLR Version v4.0.30319 and managed pipeline mode is integrated.

  • IIS configuration is as below:


  • Web config is as below:

<?xml version="1.0" encoding="utf-8"?>
    <configuration>
      <system.webServer>
        <handlers>
          <add name="aspNetCore" path="*" verb="*" modules="AspNetCoreModule" resourceType="Unspecified" />
        </handlers>
        <aspNetCore processPath="dotnet" arguments=".\MES.dll" stdoutLogEnabled="false" stdoutLogFile=".\logs\stdout" />
      </system.webServer>
    </configuration>
    <!--ProjectGuid: e8701310-485f-4f88-b7d0-1473d07238ac-->

浏览页面时我收到以下消息: 但是,当我删除

<aspNetCore processPath="dotnet" arguments=".\MES.dll" stdoutLogEnabled="false" stdoutLogFile=".\logs\stdout" /> 

来自 web.config 我没有收到(执行此操作时出现错误)错误,但我收到以下错误:

添加 <aspNetCore> 并在此机器上安装 ASP.NET 核心模块,

https://docs.microsoft.com/en-us/aspnet/core/fundamentals/servers/aspnet-core-module?tabs=aspnetcore2x

我还编写了一个工具来更好地自动进行此类检测,

https://www.jexusmanager.com/tutorials/oob-500.html

我在使用 .NET Core 2.1 时遇到了这个问题。 我安装了 2.1 SDK (v2.1.301),正如 Microsoft 所说,Hosting Bundle 现在与 SDK 一起安装,但在我的情况下,这不起作用。 只有当我为 Hosting Bundle Installer 安装 2.1 Runtime (v2.1.1) 时,这个问题才消失。

当我尝试双击具有错误 Web.config 的任何站点的“日志记录”模块时出现此错误。

"Bad" 包括 Web.configs 只是有一个 IIS 不理解的模块 - 在我的例子中,IIS 10 无法理解 <rewrite> 标签,并因此爆炸极其混乱的错误。

您可以通过注释掉 Web.config 的内容来验证这一点。错误消失 - 然后逐渐减少被注释掉的数量,直到找到罪魁祸首,并找到解决方案。

此错误通常是由 web.config 内的引用引起的,dotNet 运行 时间无法解决。

如果您使用的是 dotNet 核心,并且在将服务器配置为 运行 IIS 之前安装了 dotNet 核心托管包,您可能会遇到此错误。

要在这种情况下修复它,您需要在 "repair mode"

中重新 运行 dotNet 核心托管捆绑包安装程序

As described in the box entitled "Important", here.

也许你需要安装URL Rewrite 我有同样的问题。