网站和 Web 应用程序依赖于 Internet Information Services (IIS) 应用程序池的可用性。而 IIS 应用程序池又依赖于 Windows Process Activation Service (WAS)。如果在启动或关闭应用程序池时,WAS 未运行或发生错误,则网站和 Web 应用程序可能不可用。
要解决此问题,你需要修复 ApplicationHost.Config 文件的 globalModules 部分中的问题。
要配置 ApplicationHost.config 中的 globalModules 部分,请执行以下操作:
打开提升的命令提示符窗口。单击“开始”,指向“所有程序”,单击“附件”,右键单击“命令提示符”,然后单击“以管理员身份运行”。
键入“cd %Windir%\system32\inetsrv\”。
键入“appcmd add backup backupName”以备份 ApplicationHost.config 文件。将使用你指定的备份名称在 %Windir%\system32\inetsrv\backup 目录下创建目录。如果不指定名称,则 appcmd 将使用当前日期和时间自动生成目录名称。
键入 cd %Windir%\system32\inetsrv\config
键入 notepad ApplicationHost.config
在记事本中,搜索“system.webServer”部分下的“globalModules”部分。
以 IIS 8: globalModules 元素(IIS 设置架构)文章为指南,来更正 ApplicationHost.config 文件中的 globalModules 部分的配置错误。
保存并关闭 ApplicationHost.config 文件。
Target | Microsoft.Windows.InternetInformationServices.6.2.ApplicationPool |
Category | Alert |
Enabled | True |
Alert Generate | False |
Remotable | True |
ID | Module Type | TypeId | RunAs |
---|---|---|---|
DS | DataSource | Microsoft.Windows.Server.IIS.6.2.WarningAndErrorEventProvider | Default |
Filter | ConditionDetection | Microsoft.Windows.InternetInformationServices.6.2.ApplicationPool.EventFilter | Default |
WA | WriteAction | Microsoft.Windows.Server.IIS.6.2.GenerateAlertAction.SuppressedByDescription | Default |
<Rule ID="Microsoft.Windows.InternetInformationServices.6.2.Worker.process.for.application.pool.encountered.an.error.while.trying.to.read.global.module.configuration" Enabled="true" Target="Microsoft.Windows.InternetInformationServices.6.2.ApplicationPool" ConfirmDelivery="false" Remotable="true" Priority="Normal" DiscardLevel="100">
<Category>Alert</Category>
<DataSources>
<DataSource ID="DS" TypeID="Microsoft.Windows.Server.IIS.6.2.WarningAndErrorEventProvider">
<LogName>Application</LogName>
</DataSource>
</DataSources>
<ConditionDetection ID="Filter" TypeID="Microsoft.Windows.InternetInformationServices.6.2.ApplicationPool.EventFilter">
<Expression>
<And>
<Expression>
<SimpleExpression>
<ValueExpression>
<XPathQuery>EventDisplayNumber</XPathQuery>
</ValueExpression>
<Operator>Equal</Operator>
<ValueExpression>
<Value>2297</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>
</ConditionDetection>
<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.Worker.process.for.application.pool.encountered.an.error.while.trying.to.read.global.module.configuration.AlertMessage"]$</AlertMessageId>
</WriteAction>
</WriteActions>
</Rule>