在IIS 7.5上的ASP详细的错误消息

我有真正的问题得到一些(外部编写)在IIS 7.5上运行的ASP。

ASP设置,我已经在文章中提到的两个地方启用了错误消息,如http://weblogs.asp.net/nannettethacker/archive/2009/01/09/enabling-asp-classic-error-messages- in-iis7-and-windows-web-server-2008.aspx ,但是我没有得到正确的错误信息。

例如,这个ASP页面按预期工作(在屏幕上显示“hello world”):

hello <% Response.Write "world" %> 

有趣的是,如果我强制编译错误,我会得到详细的错误:

 hello <% Response.Write "world"; %> 

生产:

 Microsoft VBScript compilation error '800a0401' Expected end of statement /test.asp, line 3 Response.Write "world"; ----------------------^ 

但是,如果我更改代码以便产生运行时错误,则会失败:

 hello <% Dim x: x = Int("hello world") Response.Write "world" %> 

这将输出:

 hello 

即没有错误,没有“世界”,没有什么。 在Fiddler中追踪请求/响应表明它似乎停止在这一点上。 我无法看到logging错误的服务器上的任何东西。

一直把我的头发扯出来 – 我只是看不到吞咽错误的东西。

我find了问题的原因。 如果在应用程序池中将“启用32位应用程序”设置为True,则不会收到运行时错误。 将其设置为False会显示运行时错误。