WAS 在嘗試讀取組態時發生錯誤

Microsoft.Windows.InternetInformationServices.6.2.WAS.encountered.an.error.trying.to.read.configuration (Rule)

Knowledge Base article:

摘要

Internet Information Services (IIS) Windows 處理序啟用服務 (WAS) 組態管理員負責管理應用程式集區的組態和其維護的通訊協定介面卡。若 WAS 在讀取組態或回應變更通知時發生問題,便可能無法處理其所管理之實體的組態變更。

解決方式

修正損毀的設定檔

如果 ApplicationHost.config 等設定檔包含無效字元,Windows 處理序啟用服務 (WAS) 可能無法從該檔案讀取設定資料。

可能的解決方案包括:

修正設定檔中的無效字元

修正設定檔中的無效字元:

注意:若有較舊版本的設定檔,便有助於用來進行比較。

從備份還原設定檔

從備份還原設定檔:

Element properties:

TargetMicrosoft.Windows.InternetInformationServices.6.2.WebServer
CategoryAlert
EnabledTrue
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.6.2.GenerateAlertAction.SuppressedByDescription Default

Source Code:

<Rule ID="Microsoft.Windows.InternetInformationServices.6.2.WAS.encountered.an.error.trying.to.read.configuration" Enabled="true" Target="Microsoft.Windows.InternetInformationServices.6.2.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>
<RegExExpression>
<ValueExpression>
<XPathQuery>EventDisplayNumber</XPathQuery>
</ValueExpression>
<Operator>MatchesRegularExpression</Operator>
<Pattern>^(5172|5173)$</Pattern>
</RegExExpression>
</Expression>
</And>
</Expression>
</DataSource>
</DataSources>
<WriteActions>
<WriteAction ID="WA" TypeID="Microsoft.Windows.Server.IIS.6.2.GenerateAlertAction.SuppressedByDescription">
<Priority>1</Priority>
<Severity>1</Severity>
<AlertMessageId>$MPElement[Name="Microsoft.Windows.InternetInformationServices.6.2.WAS.encountered.an.error.trying.to.read.configuration.AlertMessage"]$</AlertMessageId>
</WriteAction>
</WriteActions>
</Rule>