Windows 7 / Server 2008 R2 安裝 IIS 7.5 除錯傳統 ASP 頁面時,預設只顯示通用錯誤「An error occurred on the server when processing the URL...」,無法看到實際錯誤行號與描述。需啟用 ASP 偵錯屬性「將錯誤傳送到瀏覽器」。
cd /d %windir%\system32\inetsrv
appcmd set config -section:asp -scriptErrorSentToBrowser:true
或單行:
`%windir%\system32\inetsrv\appcmd set config -section:asp -scriptErrorSentToBrowser:true`

重新瀏覽出錯的 ASP 頁面,現在會顯示具體錯誤:
`Microsoft VBScript runtime error '800a000d'`
`Type mismatch: 'variable'`
`/path/to/page.asp, line 42`
公開對外的 Web 伺服器嚴禁開啟此選項! 詳細錯誤資訊 (路徑、資料庫連線字串、程式碼片段) 會洩露給攻擊者,利用進行 SQL 注入、路徑遍歷、程式碼審計等攻擊。僅限開發/測試/內網環境使用。正式環境請查看 IIS 日誌 (`C:\inetpub\logs\LogFiles\W3SVC1\`)、事件檢視器、或自訂錯誤頁面 (`