【问题标题】:ASP Error and IIS 7.0ASP 错误和 IIS 7.0
【发布时间】:2009-01-26 04:29:29
【问题描述】:

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

【问题讨论】:

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


    【解决方案1】:

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

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

    【讨论】:

      猜你喜欢
      • 2011-05-20
      • 1970-01-01
      • 1970-01-01
      • 2023-04-07
      • 2011-04-02
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多