無法初始化網站的記錄模組

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

Knowledge Base article:

摘要

使用 HTTP 的 Internet Information Services (IIS) 網站依賴數個重要的 IIS 元件來支持其可用性。Windows 處理序啟用服務 (WAS)、World Wide Web Publishing 服務 (W3SVC) 和 HTTP 服務都必須正確運作。此外,網站的應用程式也必須有正常運作中的應用程式集區可供使用。如果其中有任一元件無法運作,網站將無法使用。

解決方式

停止和重新啟動 W3SVC

停止 W3SVC 服務也會同時停止相依於 W3SVC 的所有其他服務。因此,您可能也必須啟動其他的這些服務。

停止和重新啟動 W3SVC:

Element properties:

TargetMicrosoft.Windows.InternetInformationServices.6.2.WebSite
Parent MonitorSystem.Health.ConfigurationState
CategoryConfigurationHealth
EnabledTrue
Alert GenerateTrue
Alert SeverityError
Alert PriorityNormal
Alert Auto ResolveTrue
Monitor TypeMicrosoft.Windows.InternetInformationServices.6.2.WebSite.EventLogManualReset2StateMonitorType
RemotableTrue
AccessibilityPublic
Alert Message
無法初始化網站的記錄模組
{0}
RunAsDefault

Source Code:

<UnitMonitor ID="Microsoft.Windows.InternetInformationServices.6.2.WebSite.Failed.To.Initialize.Logging.For.WebSite.Monitor" Accessibility="Public" Enabled="true" Target="Microsoft.Windows.InternetInformationServices.6.2.WebSite" ParentMonitorID="SystemHealth!System.Health.ConfigurationState" Remotable="true" Priority="Normal" TypeID="Microsoft.Windows.InternetInformationServices.6.2.WebSite.EventLogManualReset2StateMonitorType" ConfirmDelivery="false">
<Category>ConfigurationHealth</Category>
<AlertSettings AlertMessage="Microsoft.Windows.InternetInformationServices.6.2.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-W3SVC-WP</Value>
</ValueExpression>
</SimpleExpression>
</Expression>
</And>
</Expression>
</Configuration>
</UnitMonitor>