2009-01-26 104 views
1

在IIS 6中,ASP錯誤顯示了行號和問題描述。例如,ASP錯誤和IIS 7.0

{call dbo.spGetCommunityInfo(xx)} 
Microsoft SQL Native Client error '80020005' 
Invalid character value for cast specification 
/communitydetail.asp, line 42 

IIS 7改變了處理ASP錯誤的方式,並顯示了一些不太有用的東西。例如,

Internal Server Error 
The server encountered an internal error or misconfiguration and was unable to complete your request 

有誰知道需要什麼配置更改才能獲得IIS 7中的IIS 6的行爲?

回答

1

您可以使用AppCmd打開ScriptErrorSentToBrowser(它在IIS7默認情況下爲false,在IIS6中爲true)。 APPCMD住在%SYSTEMROOT%\ SYSTEM32 \ INETSRV,你需要運行它爲管理員:

Appcmd.exe的設置配置 -section:system.webServer/ASP -ScriptErrorSentToBrowser:真