服务器端包含文件包含其自身或者超出了服务器端包含所允许的最大深度

Microsoft.Windows.InternetInformationServices.2008.A.server.side.include.file.has.included.itself.or.the.maximum.depth.of.server.side.includes.has.been.exceeded (Rule)

Knowledge Base article:

Summary

为了成功执行其活动,Internet Information Services (IIS) World Wide Web 发布服务 (W3SVC) 不能存在任何涉及文件访问、内存可用性和网络连接的 I/O 错误。 此外,使用的任何脚本都必须能够访问且正在运行,并且所有包含文件都必须正确配置。

解决方法

删除嵌套的包含文件

嵌套包含文件的可能解决方法包括:

检查服务器端包含文件是否包含它自身

若要检查服务器端包含文件是否包含它自身,请执行以下操作:

检查是否超出了服务器端包含所允许的最大深度

若要检查是否超出了服务器端包含所允许的最大深度,请执行以下操作:

Element properties:

TargetMicrosoft.Windows.InternetInformationServices.2008.WebServer
CategoryAlert
EnabledTrue
Event_ID2221
Event SourceMicrosoft-Windows-IIS-WMSVC
Alert GenerateTrue
Alert SeverityWarning
Alert PriorityNormal
RemotableTrue
Alert Message
服务器端包含文件包含其自身或者超出了服务器端包含所允许的最大深度
{0}
Event LogApplication

Member Modules:

ID Module Type TypeId RunAs 
DS DataSource Microsoft.Windows.EventProvider Default
WA WriteAction Microsoft.Windows.Server.IIS.2008.GenerateAlertAction.SuppressedByDescription Default

Source Code:

<Rule ID="Microsoft.Windows.InternetInformationServices.2008.A.server.side.include.file.has.included.itself.or.the.maximum.depth.of.server.side.includes.has.been.exceeded" Enabled="onEssentialMonitoring" Target="Microsoft.Windows.InternetInformationServices.2008.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-WMSVC</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.2008.GenerateAlertAction.SuppressedByDescription">
<Priority>1</Priority>
<Severity>1</Severity>
<AlertMessageId>$MPElement[Name="Microsoft.Windows.InternetInformationServices.2008.A.server.side.include.file.has.included.itself.or.the.maximum.depth.of.server.side.includes.has.been.exceeded.AlertMessage"]$</AlertMessageId>
</WriteAction>
</WriteActions>
</Rule>