ASP 頁面是包含伺服器端指令碼的 HTML 頁面,這些指令碼在傳送至使用者的電腦之前會經由 Web 伺服器處理。伺服器端指令碼會在瀏覽器從 Web 伺服器要求 .asp 檔案時執行。ASP 是由 Web 伺服器所呼叫,Web 伺服器會從上到下處理所要求的檔案,並執行所有指令碼命令。接著它會將標準網頁格式化並傳送給瀏覽器。
修正 ASP 應用程式
如果發生 ASP 應用程式錯誤,可能的解決方法包括:
如果您是從協力廠商購買應用程式,請針對錯誤聯絡該廠商。廠商對於應用程式的功能和行為應具備較深入的知識。
請參閱文章「 ASP 疑難排解祕訣和技術」。
檢查事件記錄訊息,以取得訊息中包含的特定錯誤號碼。此錯誤編號將與事件 ID 有所不同。若要執行此操作,請參閱下列步驟。
查看事件記錄檔訊息中的特定錯誤號碼
查看事件記錄檔訊息中的特定錯誤號碼:
在 [事件檢視器] 中,選取您收到的事件。
在 [一般] 索引標籤中,尋找事件訊息中的錯誤號碼。以下範例為包含錯誤號碼的事件記錄檔訊息:
警告:ASP:UNC 存取檔案失敗 - \\WEBSITES\MYWEBSITE\DEFAULT.ASP,錯誤 = -2147024829。
進一步了解特定的錯誤號碼
進一步了解特定的錯誤號碼:
從 [ Microsoft Exchange Server 錯誤碼查閱] 頁面下載 Err.exe 公用程式。
開啟提高權限的 [命令提示字元] 視窗。按一下 [開始],指向 [所有程式],按一下 [附屬應用程式],以滑鼠右鍵按一下 [命令提示字元],然後按一下 [以系統管理員身分執行]。
在命令提示字元中,導覽至剛將 Err.exe 下載至其中的目錄。例如,如果您將 Err.exe 下載至 C:\Err,請輸入 cd C:\Err。
輸入錯誤編號以取得關於錯誤的詳細資訊。例如,如果錯誤號碼如以上範例為 -2147024829,請輸入 err -2147024829。
在引用的範例中,錯誤解析為「找不到網路名稱」,其可能表示輸入了錯誤的電腦名稱、位於 UNC 路徑上的電腦已關機,或是發生 WINS 問題。
Target | Microsoft.Windows.InternetInformationServices.10.0.WebServer |
Category | Alert |
Enabled | True |
Event Source | Active Server Pages |
Alert Generate | False |
Remotable | True |
Event Log | Application |
ID | Module Type | TypeId | RunAs |
---|---|---|---|
DS | DataSource | Microsoft.Windows.EventProvider | Default |
WA | WriteAction | Microsoft.Windows.Server.IIS.10.0.GenerateAlertAction.SuppressedByDescription | Default |
<Rule ID="Microsoft.Windows.InternetInformationServices.10.0.ASP.application.error.occured" Enabled="true" Target="Microsoft.Windows.InternetInformationServices.10.0.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>Application</LogName>
<Expression>
<And>
<Expression>
<SimpleExpression>
<ValueExpression>
<XPathQuery Type="String">PublisherName</XPathQuery>
</ValueExpression>
<Operator>Equal</Operator>
<ValueExpression>
<Value Type="String">Active Server Pages</Value>
</ValueExpression>
</SimpleExpression>
</Expression>
<Expression>
<RegExExpression>
<ValueExpression>
<XPathQuery>EventDisplayNumber</XPathQuery>
</ValueExpression>
<Operator>MatchesRegularExpression</Operator>
<Pattern>^(500|499|23|22|21|20|19|18|17|16|9|8|7|6|5)$</Pattern>
</RegExExpression>
</Expression>
</And>
</Expression>
</DataSource>
</DataSources>
<WriteActions>
<WriteAction ID="WA" TypeID="Microsoft.Windows.Server.IIS.10.0.GenerateAlertAction.SuppressedByDescription">
<Priority>1</Priority>
<Severity>1</Severity>
<AlertMessageId>$MPElement[Name="Microsoft.Windows.InternetInformationServices.10.0.ASP.application.error.occured.AlertMessage"]$</AlertMessageId>
</WriteAction>
</WriteActions>
</Rule>