使用 HTTP 的 Internet Information Services (IIS) 网站依赖于几个重要的 IIS 组件来确保可用性。Windows Process Activation Service (WAS)、World Wide Web 发布服务 (W3SVC)、HTTP 服务都必须正确运行。此外,必须为网站的应用程序提供正常运行的应用程序池。如果其中的任何组件未正常运行,网站将不可用。
删除重复的绑定
拥有重复 URL 绑定的网站将导致其中一个网站被禁用。确保你不尝试在 ApplicationHost.config 或 Web.config 文件中注册重复应用程序 URL。要解决重复问题,确定哪些站点正在使用相同的绑定。然后,在必要时修改绑定,并重新启动站点。你可以遵照 A、B 和 C 中的步骤完成此操作。
A.确定正在使用相同绑定的站点
若要确定正在使用相同绑定的站点,请执行以下操作:
单击“开始”,再单击“控制面板”,然后单击“管理工具”。
右键单击 Internet Information Services (IIS) 管理器并选择“以管理员身份运行”。
在“IIS 管理器连接”窗格中,展开计算机名。
左键单击“站点”文件夹。将在右侧的“功能视图”中显示服务器上的网站列表。每个站点的绑定都列在“绑定”列中。
查看绑定列表,并查找具有相同绑定属性集的站点。例如,寻找两个都具有 *:80 (http) 绑定的站点。
B.删除重复的绑定
若要删除重复的绑定,请执行以下操作:
在 IIS 管理器中,在“连接”窗格中选择要配置的网站。
在“操作”窗格中,单击“绑定”...
若要修改现有的绑定,请选择该绑定,然后单击“编辑”。
若要添加新绑定,单击“添加”...
在设置站点的唯一绑定后,单击“确定”,然后单击“关闭”。
C.重启网站
若要重新启动网站,请执行以下操作:
在 IIS 管理器中,在“连接”窗格中选择要启动的网站。
在“操作”窗格中,单击“停止”以停止站点。
在“操作”窗格中,单击“启动”以启动站点。
你还可以使用以下链接来执行这些操作:
停止网站
启动网站
Target | Microsoft.Windows.InternetInformationServices.6.2.WebSite | ||
Parent Monitor | System.Health.ConfigurationState | ||
Category | ConfigurationHealth | ||
Enabled | True | ||
Alert Generate | True | ||
Alert Severity | Error | ||
Alert Priority | Normal | ||
Alert Auto Resolve | True | ||
Monitor Type | Microsoft.Windows.InternetInformationServices.6.2.WebSite.EventLogManualReset2StateMonitorType | ||
Remotable | True | ||
Accessibility | Public | ||
Alert Message |
| ||
RunAs | Default |
<UnitMonitor ID="Microsoft.Windows.InternetInformationServices.6.2.WebSite.DuplicateBinding.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.DuplicateBinding.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>System</LogName>
<Expression>
<And>
<Expression>
<SimpleExpression>
<ValueExpression>
<XPathQuery>EventDisplayNumber</XPathQuery>
</ValueExpression>
<Operator>Equal</Operator>
<ValueExpression>
<Value>1007</Value>
</ValueExpression>
</SimpleExpression>
</Expression>
<Expression>
<SimpleExpression>
<ValueExpression>
<XPathQuery Type="String">PublisherName</XPathQuery>
</ValueExpression>
<Operator>Equal</Operator>
<ValueExpression>
<Value Type="String">Microsoft-Windows-IIS-W3SVC</Value>
</ValueExpression>
</SimpleExpression>
</Expression>
</And>
</Expression>
</Configuration>
</UnitMonitor>