IIS(执行此操作时出错)

问题描述 投票:4回答:3

我收到(执行此操作时出错)错误引用web.config。我按照以下配置:

  • 操作系统是Windows Server 2012 R2,IIS版本为8.5。
  • URL Rewrite 2.1模块安装在机器上。
  • IIS_IUSRS具有对该目录的完全访问权限。
  • 已安装应用程序初始化模块
  • .Net CLR版本v4.0.30319和集中管理流水线模式。
  • IIS配置如下:
  • enter image description here
  • enter image description here Web配置如下:
<?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-->

浏览我收到以下消息的页面:enter image description here但是,当我删除

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

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

非常感谢您的支持。

asp.net .net iis windows-server-2012-r2
3个回答
4
投票

添加回来并在此计算机上安装ASP.NET Core模块,

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

我还写了一个工具来更好地自动化这种检测,

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


2
投票

enter image description here

当我尝试双击具有错误Web.config的任何站点的日志记录模块时,我发生了此错误。

“坏”包括Web.configs只有一个模块IIS不理解 - 在我的情况下,IIS 10无法理解<rewrite>标记,并爆炸与这个极其混乱的错误。

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


1
投票

我有.NET Core 2.1的这个问题。我安装了2.1 SDK(v2.1.301),微软称Hosting Bundle现在安装了SDK,但在我的情况下,这不起作用。仅当我为Hosting Bundle Installer安装2.1 Runtime(v2.1.1)时,此问题才会消失。

enter image description here

© www.soinside.com 2019 - 2024. All rights reserved.