ASP错误和IIS 7.0

时间:2009-01-26 04:29:30

标签: iis-7 asp-classic iis-6 ado

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

1 个答案:

答案 0 :(得分:1)

您可以使用AppCmd打开ScriptErrorSentToBrowser(它在IIS7默认值中为false,在IIS6中也是如此)。 AppCmd位于%SystemRoot%\ system32 \ inetsrv中,您需要以管理员身份运行它:

  

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