WAS encountered a failure while setting the affinity mask of an application pool

Microsoft.Windows.InternetInformationServices.2008.WAS.encountered.a.failure.while.setting.the.affinity.mask.of.an.application.pool (Rule)

Knowledge Base article:

Summary

To ensure Web site and Web application isolation, Internet Information Services (IIS) application pools must be configured to have unique names and correctly configured identities. If errors occur during the configuration of an application pool, the application pool may not be available to serve the Web sites and Web applications that are assigned to it.

Resolutions

Correct the application pool configuration as indicated in the event log message. If the problem persists, check the permissions on the ApplicationHost.config file and make sure that all required services are started. In some cases, you may have to stop and restart WAS.

Edit the application pool configuration by using Internet Information Services (IIS) Manager

To edit the application pool configuration:

Stop and restart WAS

To stop and restart WAS:

Note: Stopping WAS will also stop any other services that depend on it, including the World Wide Web Publishing Service (W3SVC). Thus, you may also have to restart W3SVC or other services.

Element properties:

TargetMicrosoft.Windows.InternetInformationServices.2008.ApplicationPool
CategoryAlert
EnabledTrue
Alert GenerateTrue
Alert SeverityWarning
Alert PriorityNormal
RemotableTrue
Alert Message
WAS encountered a failure while setting the affinity mask of an application pool
{0}

Member Modules:

ID Module Type TypeId RunAs 
DS DataSource Microsoft.Windows.Server.IIS.2008.WarningAndErrorEventProvider Default
Filter ConditionDetection Microsoft.Windows.InternetInformationServices.2008.ApplicationPool.EventFilter Default
WA WriteAction Microsoft.Windows.Server.IIS.2008.GenerateAlertAction.SuppressedByDescription Default

Source Code:

<Rule ID="Microsoft.Windows.InternetInformationServices.2008.WAS.encountered.a.failure.while.setting.the.affinity.mask.of.an.application.pool" Enabled="onEssentialMonitoring" Target="Microsoft.Windows.InternetInformationServices.2008.ApplicationPool" ConfirmDelivery="false" Remotable="true" Priority="Normal" DiscardLevel="100">
<Category>Alert</Category>
<DataSources>
<DataSource ID="DS" TypeID="Microsoft.Windows.Server.IIS.2008.WarningAndErrorEventProvider">
<LogName>System</LogName>
</DataSource>
</DataSources>
<ConditionDetection ID="Filter" TypeID="Microsoft.Windows.InternetInformationServices.2008.ApplicationPool.EventFilter">
<Expression>
<And>
<Expression>
<SimpleExpression>
<ValueExpression>
<XPathQuery>EventDisplayNumber</XPathQuery>
</ValueExpression>
<Operator>Equal</Operator>
<ValueExpression>
<Value>5058</Value>
</ValueExpression>
</SimpleExpression>
</Expression>
<Expression>
<SimpleExpression>
<ValueExpression>
<XPathQuery Type="String">PublisherName</XPathQuery>
</ValueExpression>
<Operator>Equal</Operator>
<ValueExpression>
<Value Type="String">Microsoft-Windows-WAS</Value>
</ValueExpression>
</SimpleExpression>
</Expression>
</And>
</Expression>
</ConditionDetection>
<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.WAS.encountered.a.failure.while.setting.the.affinity.mask.of.an.application.pool.AlertMessage"]$</AlertMessageId>
</WriteAction>
</WriteActions>
</Rule>