WAS is stopping because it encountered an error

Microsoft.Windows.InternetInformationServices.10.0.WAS.is.stopping.because.it.encountered.an.error (Rule)

Knowledge Base article:

Summary

Windows Process Activation Service (WAS) is stopping because it encountered an error

Causes

The most common reason why WAS might be stopping unexpectedly is a corrupt IIS configuration file or an incorrectly configured application.

Resolutions

Check the IIS active alerts view to see if there are any alerts generated by the IIS MP about a corrupted IIS configuration file or an incorrectly configured web site. If no alerts are present, check the System and Application event logs on the IIS server.

Element properties:

TargetMicrosoft.Windows.InternetInformationServices.10.0.WebServer
CategoryAlert
EnabledTrue
Event_ID5005
Event SourceMicrosoft-Windows-WAS
Alert GenerateFalse
RemotableTrue
Event LogSystem

Member Modules:

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

Source Code:

<Rule ID="Microsoft.Windows.InternetInformationServices.10.0.WAS.is.stopping.because.it.encountered.an.error" 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>System</LogName>
<Expression>
<And>
<Expression>
<SimpleExpression>
<ValueExpression>
<XPathQuery Type="String">PublisherName</XPathQuery>
</ValueExpression>
<Operator>Equal</Operator>
<ValueExpression>
<Value Type="String">Microsoft-Windows-WAS</Value>
</ValueExpression>
</SimpleExpression>
</Expression>
<Expression>
<SimpleExpression>
<ValueExpression>
<XPathQuery>EventDisplayNumber</XPathQuery>
</ValueExpression>
<Operator>Equal</Operator>
<ValueExpression>
<Value>5005</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>2</Severity>
<AlertMessageId>$MPElement[Name="Microsoft.Windows.InternetInformationServices.10.0.WAS.is.stopping.because.it.encountered.an.error.AlertMessage"]$</AlertMessageId>
</WriteAction>
</WriteActions>
</Rule>