Previous Next

Thread: Classic ASP - not displaying specific error messages

Last post 06-15-2008 10:35 PM by steve schofield. 1 replies.

Average Rating Rate It (5)

RSS

Page 1 of 1 (2 items)

Sort Posts:

  • 06-15-2008, 8:45 AM

    Classic ASP - not displaying specific error messages

    Hi all,

    I am running IIS7 on Vista Home Premium.
    I have the following issue: not all errors in Classic ASP pages (using VBScript) are generating a 500 error. Some generate a 200 status code and stop the page from further executing. I find this very frustrating!

    For example - this works (of course):
    <% Option Explicit %>
    <%
    Dim strResponse

    strResponse=generateString()
    Response.Write(strResponse)

    Function generateString()
     generateString="Hello all!"
    End Function
    %> 

    This should trow an error (because the function generateString2 does not exist):
    <% Option Explicit %>
    <%
    Dim strResponse

    strResponse=generateString2()
    Response.Write(strResponse)

    Function generateString()
     generateString="Hello all!"
    End Function
    %>
    But it DOESN'T!!! The page just stops executing....

    On XP Pro with IIS5 it trows a 500 error (as expected).

    Some Classic ASP errors do trow "normal" error messages. Syntax errors for example:
    <% Response.Write("Hello"); %>
    do show up in the logs and the failed request tracing folder as expected.

    Just for the record: the IIS log file tells me that ther is nothing wrong (status code 200). I have the failed request tracing setup which traces 500 errors. But nothing is there...

    So please help me...
    Is this an IIS settings issue? Or something else?
    What should I do??

    Thanks in advance!

    Johan.

  • 06-15-2008, 10:35 PM In reply to

    Re: Classic ASP - not displaying specific error messages

    By default classic asp doesn't display errors in IIS 7. You have to enable this option.

    http://blogs.iis.net/bills/archive/2007/05/21/tips-for-classic-asp-developers-on-iis7.aspx

    To revert back to IIS6- behavior, simply run the following command:

    %windir%\system32\inetsrv\appcmd set config -section:asp -scriptErrorSentToBrowser:true

    Steve Schofield
    Windows Server MVP - IIS
    MCTS - Windows Hosting

    http://weblogs.asp.net/steveschofield
    http://www.iislogs.com
    http://www.orcsweb.com/
    Managed Hosting Solutions
    #1 in Service and Support
Page 1 of 1 (2 items)
Page view counter