使用 HTTP 的 Internet Information Services (IIS) 網站依賴數個重要的 IIS 元件來支持其可用性。Windows 處理序啟用服務 (WAS)、World Wide Web Publishing 服務 (W3SVC) 和 HTTP 服務都必須正確運作。此外,網站的應用程式也必須有正常運作中的應用程式集區可供使用。如果其中有任一元件無法運作,網站將無法使用。
為站台設定應用程式路徑
網站必須具備有效的應用程式路徑。如果應用程式路徑不正確,站台將無法啟動。為網站設定有效的應用程式路徑,然後重新啟動網站。
為網站設定有效的應用程式路徑
為網站設定有效的應用程式路徑:
開啟提高權限的 [命令提示字元] 視窗。按一下 [開始],指向 [所有程式],按一下 [附屬應用程式],以滑鼠右鍵按一下 [命令提示字元],然後按一下 [以系統管理員身分執行]。
輸入 cd % Windir %\system32\inetsrv\config
輸入 notepad ApplicationHost.config。
在記事本中搜尋 system.applicationHost 底下的站台區段,然後找出導致錯誤的網站。
修正應用程式路徑,或將以下內容新增至站台組態使其具有預設路徑:
<application path="/">
<virtualDirectory path="/" physicalPath="%SystemDrive%\inetpub\wwwroot" />
</application>
重新啟動網站
重新啟動網站:
依序按一下 [開始]、[控制台] 和 [系統管理工具]。
對 [Internet Information Services (IIS) 管理員] 按滑鼠右鍵,然後選取 [以系統管理員身分執行]。
在 [IIS 管理員連線] 窗格中展開電腦名稱。
展開站台。
選取必須重新啟動的網站。
在 [動作] 窗格中,按一下 [停止] 以停止站台。
在 [動作] 窗格中,按一下 [啟動] 以啟動站台。
您也可以使用以下連結來執行此操作:
停止網站
啟動網站
Target | Microsoft.Windows.InternetInformationServices.10.0.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.10.0.WebSite.EventLogManualReset2StateMonitorType | ||
Remotable | True | ||
Accessibility | Public | ||
Alert Message |
| ||
RunAs | Default |
<UnitMonitor ID="Microsoft.Windows.InternetInformationServices.10.0.WebSite.RootApplicationDefined.Monitor" Accessibility="Public" Enabled="true" Target="Microsoft.Windows.InternetInformationServices.10.0.WebSite" ParentMonitorID="SystemHealth!System.Health.ConfigurationState" Remotable="true" Priority="Normal" TypeID="Microsoft.Windows.InternetInformationServices.10.0.WebSite.EventLogManualReset2StateMonitorType" ConfirmDelivery="false">
<Category>ConfigurationHealth</Category>
<AlertSettings AlertMessage="Microsoft.Windows.InternetInformationServices.10.0.WebSite.RootApplicationDefined.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>
<RegExExpression>
<ValueExpression>
<XPathQuery>EventDisplayNumber</XPathQuery>
</ValueExpression>
<Operator>MatchesRegularExpression</Operator>
<Pattern>^(5056|5161)$</Pattern>
</RegExExpression>
</Expression>
<Expression>
<SimpleExpression>
<ValueExpression>
<XPathQuery Type="String">PublisherName</XPathQuery>
</ValueExpression>
<Operator>Equal</Operator>
<ValueExpression>
<Value Type="String">Microsoft-Windows-WAS</Value>
</ValueExpression>
</SimpleExpression>
</Expression>
</And>
</Expression>
</Configuration>
</UnitMonitor>