Iis 7 ASP错误和IIS 7.0

Iis 7 ASP错误和IIS 7.0,iis-7,asp-classic,iis-6,ado,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

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

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

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


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

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