1

在 IIS 6 中,ASP 错误与行号和问题描述一起显示。例如,

{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 的行为需要进行哪些配置更改?

4

1 回答 1

1

您可以使用 AppCmd 来打开 ScriptErrorSentToBrowser(在 IIS7 默认情况下为 false,在 IIS6 中为 true)。AppCmd 位于 %SystemRoot%\system32\inetsrv 中,您需要以管理员身份运行它:

appcmd.exe 设置配置 -section:system.webServer/asp -ScriptErrorSentToBrowser:true

于 2009-01-26T06:40:22.997 回答