Windows XP Windows 7 Windows 2003 Windows Vista Windows 綜合教學 Linux 系統教學
Windows 10 Windows 8 Windows 2008 Windows NT Windows Server 電腦軟體教學
您现在的位置: Windows教程網 >> Windows教程 >  >> Windows 綜合教學 >> 關於 Windows

Win10 IIS 怎麼開啟 ASP 程式錯誤訊息除錯?兩處設定「傳送錯誤到瀏覽器」+「詳細錯誤」

編輯:關於 Windows

Win10 架設 IIS 開發 ASP 應用程式需啟用詳細錯誤訊息顯示於瀏覽器,需在 IIS 管理員中完成兩處設定。

設定步驟

  1. 開啟 IIS 管理員 → 點擊網站 → 雙擊「ASP」
  2. 「偵錯屬性」→「將錯誤傳送到瀏覽器」→ True → 套用

  1. 回到網站首頁 → 雙擊「錯誤頁面」
  2. 右側「編輯功能設定」→ 選擇「詳細錯誤」→ 確定

驗證

瀏覽器造訪 ASP 頁面製造錯誤 (如語法錯誤、資料庫連線失敗),應顯示完整錯誤碼、行號、描述,而非預設的一般性 HTTP 500 頁面。

⚠ 生產環境注意

  • 除錯完成後務必改回「自訂錯誤頁面」或「詳細僅限本機」
  • 避免洩露資料庫連線字串、伺服器路徑、程式碼結構等敏感資訊

開發階段啟用詳細錯誤大幅提升除錯效率,上線前記得關閉。

Copyright © Windows教程網 All Rights Reserved