Could not initialize the logging module for web site

Microsoft.Windows.InternetInformationServices.2008.WebSite.Failed.To.Initialize.Logging.For.WebSite.Monitor (UnitMonitor)

Knowledge Base article:

Summary

Internet Information Services (IIS) Web sites that use HTTP rely on several important IIS components for their availability. The Windows Process Activation Service (WAS), the World Wide Publishing Service (W3SVC), the HTTP service, all must be running correctly. In addition, a properly running application pool must be available for the Web site’s applications. If any of these components is not functioning, the Web site will not be available.

Resolutions

Stop and restart W3SVC

Stopping the W3SVC service will also stop any other services that depend on it. Thus, you may also have to start these other services.

To stop and restart W3SVC:

Element properties:

TargetMicrosoft.Windows.InternetInformationServices.2008.WebSite
Parent MonitorSystem.Health.ConfigurationState
CategoryConfigurationHealth
EnabledTrue
Alert GenerateTrue
Alert SeverityError
Alert PriorityNormal
Alert Auto ResolveTrue
Monitor TypeMicrosoft.Windows.InternetInformationServices.2008.WebSite.EventLogManualReset2StateMonitorType
RemotableTrue
AccessibilityPublic
Alert Message
Could not initialize the logging module for web site
{0}
RunAsDefault

Source Code:

<UnitMonitor ID="Microsoft.Windows.InternetInformationServices.2008.WebSite.Failed.To.Initialize.Logging.For.WebSite.Monitor" Accessibility="Public" Enabled="onEssentialMonitoring" Target="Microsoft.Windows.InternetInformationServices.2008.WebSite" ParentMonitorID="SystemHealth!System.Health.ConfigurationState" Remotable="true" Priority="Normal" TypeID="Microsoft.Windows.InternetInformationServices.2008.WebSite.EventLogManualReset2StateMonitorType" ConfirmDelivery="false">
<Category>ConfigurationHealth</Category>
<AlertSettings AlertMessage="Microsoft.Windows.InternetInformationServices.2008.WebSite.Failed.To.Initialize.Logging.For.WebSite.Monitor.AlertMessage">
<AlertOnState>Error</AlertOnState>
<AutoResolve>true</AutoResolve>
<AlertPriority>Normal</AlertPriority>
<AlertSeverity>Error</AlertSeverity>
<AlertParameters>
<AlertParameter1>$Data/Context/EventDescription$</AlertParameter1>
</AlertParameters>
</AlertSettings>
<OperationalStates>
<OperationalState ID="ManualResetEventRaised" MonitorTypeStateID="ManualResetEventRaised" HealthState="Success"/>
<OperationalState ID="ErrorEventRaised" MonitorTypeStateID="ErrorEventRaised" HealthState="Error"/>
</OperationalStates>
<Configuration>
<LogName>Application</LogName>
<Expression>
<And>
<Expression>
<SimpleExpression>
<ValueExpression>
<XPathQuery>EventDisplayNumber</XPathQuery>
</ValueExpression>
<Operator>Equal</Operator>
<ValueExpression>
<Value>2271</Value>
</ValueExpression>
</SimpleExpression>
</Expression>
<Expression>
<SimpleExpression>
<ValueExpression>
<XPathQuery Type="String">PublisherName</XPathQuery>
</ValueExpression>
<Operator>Equal</Operator>
<ValueExpression>
<Value Type="String">Microsoft-Windows-IIS-WMSVC</Value>
</ValueExpression>
</SimpleExpression>
</Expression>
</And>
</Expression>
</Configuration>
</UnitMonitor>