我收到引用 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:
<?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 错误的任何站点的日志记录模块时,发生了此错误。
“坏”包括仅具有 IIS 无法理解的模块的 Web.config - 就我而言,IIS 10 无法理解 <rewrite>
标签,并因这个极其令人困惑的错误而爆炸。
您可以通过注释掉 Web.config 的内容来验证这一点。错误消失 - 然后逐渐减少注释的数量,直到找到罪魁祸首,并找到解决方案。
关于asp.net - IIS(执行此操作时出错),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/46208440/