Previous Next

Thread: Classic ASP - Not generating specific errors....

Last post 06-20-2008 10:30 AM by jthijs-at-hotmail. 6 replies.

Average Rating Rate It (5)

RSS

Page 1 of 1 (7 items)

Sort Posts:

  • 06-15-2008, 8:53 AM

    Classic ASP - Not generating specific errors....

    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:37 PM In reply to

    Re: Classic ASP - Not generating specific errors....

    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
    http://weblogs.asp.net/steveschofield

    http://www.IISLogs.com
    Log archival solution
    Install, Configure, Forget
  • 06-16-2008, 8:41 AM In reply to

    Re: Classic ASP - Not generating specific errors....

    Hi Dave,

    Thanks for your response. Nice to know that there are people out there who care :)

    Anyway I checked my IIS settings like you suggested, and I already have "Send Errors To Browser" set to "True". Fact is that some errors show up in my browser (like syntax errors) but not all of them (see the code in my original post).

    Any more tips?

    Johan

  • 06-17-2008, 9:40 AM In reply to

    • attiajos
    • Not Ranked
    • Joined on 06-17-2008, 1:31 PM
    • Posts 3

    Re: Classic ASP - Not generating specific errors....

    if you haven't already done that, uncheck "Show friendly HTTP error messages" in Internet Options > Advanced.

  • 06-18-2008, 3:24 AM In reply to

    Re: Classic ASP - Not generating specific errors....

    Hi Attiajos,

    That is also already turned on...
    Is it possible that you or anyone else could run my example code and check if the behavior is similar as I reported it?
    If not - then it has to do with my machine. If the behavior is similar then I hope that there is someone out there really smart who could fix this problem.

    Thanks in advance - and looking forward for the results...

    Johan

  • 06-18-2008, 8:56 AM In reply to

    • attiajos
    • Not Ranked
    • Joined on 06-17-2008, 1:31 PM
    • Posts 3

    Re: Classic ASP - Not generating specific errors....

    i will run your code on my machine when i get home from work.

  • 06-20-2008, 10:30 AM In reply to

    Re: Classic ASP - Not generating specific errors....

    Hi everyone out there!

    Could someone please test the code placed in my original post to see if the behavior is similar?

    Thanks a lot!!!

    Johan.

Page 1 of 1 (7 items)
Page view counter