IIS 7 and Above
Classic ASP - Not generating specific errors....
Last post Oct 17, 2008 09:53 AM by fbraghetto
Jun 15, 2008 08:53 AM|jthijs-at-hotmail|LINK
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 %>
This should trow an error (because the function generateString2 does not exist):
<% Option Explicit %>
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!
Jun 15, 2008 10:37 PM|steve schofield|LINK
By default classic asp doesn't display errors in IIS 7. You have to enable this option.
To revert back to IIS6- behavior, simply run the following command:
%windir%\system32\inetsrv\appcmd set config -section:asp -scriptErrorSentToBrowser:true
Windows Server MVP - IIS
Log archival solution
Install, Configure, Forget
Jun 16, 2008 08:41 AM|jthijs-at-hotmail|LINK
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?
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.
Jun 18, 2008 03:24 AM|jthijs-at-hotmail|LINK
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...
Jun 18, 2008 08:56 AM|attiajos|LINK
i will run your code on my machine when i get home from work.
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!!!
Oct 16, 2008 09:56 AM|fbraghetto|LINK
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:
While not False
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 4Loop^
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:
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.
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.
Oct 17, 2008 09:53 AM|fbraghetto|LINK
Thank you very much... your msg helped me to solve the issue.