Internet Information Services (IIS) Windows 處理序啟用服務 (WAS) 組態管理員負責管理應用程式集區的組態和其維護的通訊協定介面卡。若 WAS 在讀取組態或回應變更通知時發生問題,便可能無法處理其所管理之實體的組態變更。
修正損毀的組態檔
如果 ApplicationHost.config 等組態檔包含無效字元,Windows 處理序啟用服務 (WAS) 可能無法從該檔案讀取組態資料。
可能的解決方式包括:
修正位於事件記錄檔訊息所指出位置的檔案中的無效字元。
從備份還原組態檔的最新副本。
修正組態檔中的無效字元
修正組態檔中的無效字元:
使用 [Windows 檔案總管] 瀏覽到組態檔位置。對於 ApplicationHost.config,預設位置是 %Windir%\system32\inetsrv\config。
使用文字編輯器開啟檔案並移至事件記錄檔訊息指出的行號。
修正您找到的無效字元。
注意:若有較舊版本的組態檔,便有助於用來進行比較。
儲存並關閉檔案。
如果對檔案進行的修正無法解決問題,您可從可用的備份還原組態檔。若要執行此操作,請參閱以下程序。
從備份還原組態檔
從備份還原組態檔:
如果您有已知且良好的組態檔副本,只需將良好的檔案複製到組態檔位置,即可將目前的檔案取代為良好的副本。對於 ApplicationHost.config,預設檔案位置是 %Windir%\system32\inetsrv\config。
如果受影響的檔案是 ApplicationHost.config,且您已啟用 IIS 8 組態歷程記錄功能,則可從組態歷程記錄存放區還原自動儲存的備份。較舊版本的 ApplicationHost.config 檔案依預設會儲存在 %SystemDrive%\inetpub\history 資料夾底下的子資料夾中。
Target | Microsoft.Windows.InternetInformationServices.6.2.WebServer |
Category | Alert |
Enabled | True |
Event Source | Microsoft-Windows-WAS |
Alert Generate | False |
Remotable | True |
Event Log | System |
ID | Module Type | TypeId | RunAs |
---|---|---|---|
DS | DataSource | Microsoft.Windows.EventProvider | Default |
WA | WriteAction | Microsoft.Windows.Server.IIS.6.2.GenerateAlertAction.SuppressedByDescription | Default |
<Rule ID="Microsoft.Windows.InternetInformationServices.6.2.WAS.encountered.an.error.trying.to.read.configuration" Enabled="onEssentialMonitoring" 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>