asp.net - IIS(执行此操作时出错)

标签 asp.net .net iis windows-server-2012-r2

我收到引用 web.config 的执行此操作时出现错误错误。我遵循以下配置:

  • 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:

  • enter image description here

  • enter image description here
    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-->

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

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

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

最佳答案

enter image description here

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

“坏”包括仅具有 IIS 无法理解的模块的 Web.config - 就我而言,IIS 10 无法理解 <rewrite>标签,并因这个极其令人困惑的错误而爆炸。

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

关于asp.net - IIS(执行此操作时出错),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/46208440/

相关文章:

ASP.NET MVC 什么线程池用于自定义任务?

.net - Redis缓存.Net客户端

.net - 正确使用应用程序配置文件中的 <system.diagnostics> 设置

.net - 开发大型应用的正确方法

c# - 如何结合RegularExpressionValidator控件和RequiredFieldValidator?

asp.net - 在 ASP .NET 上的 DataList 项内的 LinkBut​​ton 中添加 Javascript 字符串值

c# - DataView RowFilter 类似运算符

c# - 无法获取托管类型 ('T' 的地址、获取其大小或声明指针)

asp.net - 浏览http和https时网站的外观差异

python - 在线运行 ASP 脚本时的安全权限