We are excited to announce that the IIS.NET Forums are moving to the new Microsoft Q&A experience. Learn more >

Classic ASP - Not generating specific errors.... [Answered]RSS

9 replies

Last post Oct 17, 2008 09:53 AM by fbraghetto

  • Classic ASP - Not generating specific errors....

    Jun 15, 2008 08:53 AM|jthijs-at-hotmail|LINK

    <div style="BORDER-RIGHT: #ddd 10px solid; BORDER-TOP: #ddd 10px solid; BORDER-LEFT: #ddd 10px solid; BORDER-BOTTOM: #ddd 10px solid">

    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.

    </div>
  • Re: Classic ASP - Not generating specific errors....

    Jun 15, 2008 10:37 PM|steve schofield|LINK

    <div class=ForumPostContentText>

    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

    </div>

    Steve Schofield
    Windows Server MVP - IIS
    http://iislogs.com/steveschofield
    http://www.IISLogs.com
    Log archival solution
    Install, Configure, Forget

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

    Jun 16, 2008 08:41 AM|jthijs-at-hotmail|LINK

    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

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

    Jun 17, 2008 09:40 AM|attiajos|LINK

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

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

    Jun 18, 2008 03:24 AM|jthijs-at-hotmail|LINK

    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

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

    Jun 18, 2008 08:56 AM|attiajos|LINK

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

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

    Jun 20, 2008 10:30 AM|jthijs-at-hotmail|LINK

    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.

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

    Oct 16, 2008 09:56 AM|fbraghetto|LINK

    Hello,

     

    I need help with a small issue about a Windows 2008 + IIS7 + ASP.

     

    About the feature in IIS7 > ASP > Compilation > Send Errors to Browser = True

    is done exactly as shown in http://blogs.iis.net/bills/archive/2007/05/21/tips-for-classic-asp-developers-on-iis7.aspx

     

    I created a code in .asp with error Intentionally to see an error... the code are:

    Response.write "OK"
    While not False
    Loop

     

     

    However, a very strange thing is happening.

    Accessing the page .asp in the same server the error is shown the correct (and expected) error like:

    Compilation error from Microsoft VBScript error '800a040e'
    'loop' without 'do'

    default.asp, line 4

    Loop
    ^

    But when the same script is accessed from another location (via browser), the errors are not specific, and is displaying an Dark and light gray page like the following:

     Server Error
    500 - Internal Server error.
    There is a problem with the resource that you are looking for and can´t be shown

     (Sorry, the actual server is installed in Portuguese, so I have to translate the msg error, so, probably is a slightly different from the error in a english installation)

     

     

    Can anyone help me to see why the error locally and remotely is different?
    I need to send the same error locally to another host.

  • bills bills

    415 Posts

    Microsoft

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

    Oct 16, 2008 06:47 PM|bills|LINK

    Try changing your error pages setting.  Go to 'error pages' feature in IIS Manager.  Click on 'Edit Feature Settings' in the right hand pane.  Choose "Detailed Errors'.

     I haven't tested this, but I think it should work.

    ~~~~~~~~~~~~~~~~~~~~~~~~
    Bill Staples
    Product Unit Manager, IIS
    blog: http://blogs.iis.net/bills
  • Re: Classic ASP - Not generating specific errors....

    Oct 17, 2008 09:53 AM|fbraghetto|LINK

     Bills,

     

    Thank you very much... your msg helped me to solve the issue.

     

    Best Regards

    Fernando