为成功执行 Internet Information Services (IIS) World Wide Web 发布服务 (W3SVC) 的活动,必须避免涉及文件访问、内存可用性和网络连接的任何 I/O 错误。此外,必须可访问和运行任何使用的脚本以及正确配置任何包含的文件。
删除嵌套包含
嵌套包含可能的解决方法包括:
检查服务器端包含文件是否发生自包含。
检查是否超出了服务器端包含的最大深度。
检查服务器端包含文件是否发生自包含
要检查服务器端包含文件是否发生自包含,请执行以下操作:
检查服务器端包含文件,确保没有服务器端包含文件发生自包含。
删除或替换所有自包含的 #include 指令。
检查是否超出了服务器端包含的最大深度
要检查是否超出了服务器端包含的最大深度,请执行以下操作:
检查服务器端包含文件,确保没有服务器端包含文件超出服务器端包含的最大深度。
删除所有超出最大深度的 #include 指令。
Target | Microsoft.Windows.InternetInformationServices.10.0.WebServer |
Category | Alert |
Enabled | True |
Event_ID | 2221 |
Event Source | Microsoft-Windows-IIS-W3SVC-WP |
Alert Generate | False |
Remotable | True |
Event Log | Application |
ID | Module Type | TypeId | RunAs |
---|---|---|---|
DS | DataSource | Microsoft.Windows.EventProvider | Default |
WA | WriteAction | Microsoft.Windows.Server.IIS.10.0.GenerateAlertAction.SuppressedByDescription | Default |
<Rule ID="Microsoft.Windows.InternetInformationServices.10.0.A.server.side.include.file.has.included.itself.or.the.maximum.depth.of.server.side.includes.has.been.exceeded" Enabled="true" Target="Microsoft.Windows.InternetInformationServices.10.0.WebServer" ConfirmDelivery="false" Remotable="true" Priority="Normal" DiscardLevel="100">
<Category>Alert</Category>
<DataSources>
<DataSource ID="DS" TypeID="Windows!Microsoft.Windows.EventProvider">
<ComputerName>$Target/Host/Host/Property[Type="Windows!Microsoft.Windows.Computer"]/NetworkName$</ComputerName>
<LogName>Application</LogName>
<Expression>
<And>
<Expression>
<SimpleExpression>
<ValueExpression>
<XPathQuery Type="String">PublisherName</XPathQuery>
</ValueExpression>
<Operator>Equal</Operator>
<ValueExpression>
<Value Type="String">Microsoft-Windows-IIS-W3SVC-WP</Value>
</ValueExpression>
</SimpleExpression>
</Expression>
<Expression>
<SimpleExpression>
<ValueExpression>
<XPathQuery>EventDisplayNumber</XPathQuery>
</ValueExpression>
<Operator>Equal</Operator>
<ValueExpression>
<Value>2221</Value>
</ValueExpression>
</SimpleExpression>
</Expression>
</And>
</Expression>
</DataSource>
</DataSources>
<WriteActions>
<WriteAction ID="WA" TypeID="Microsoft.Windows.Server.IIS.10.0.GenerateAlertAction.SuppressedByDescription">
<Priority>1</Priority>
<Severity>1</Severity>
<AlertMessageId>$MPElement[Name="Microsoft.Windows.InternetInformationServices.10.0.A.server.side.include.file.has.included.itself.or.the.maximum.depth.of.server.side.includes.has.been.exceeded.AlertMessage"]$</AlertMessageId>
</WriteAction>
</WriteActions>
</Rule>