Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

500 Vs 500.100 Error in Classic ASP

When running classic ASP application in IIS7, when would a 500 error happen rather than a 500.100 error? What I mean is that a 500 error occurs but not a 500.100 error. I am under the impression that classic ASP would only throw 500.100 errors when error occurs in it's VBScript code. Some explanation through an example would be very helpful.

like image 943
Sunil Avatar asked Feb 22 '12 14:02

Sunil


People also ask

How to check error in Classic ASP?

The ASPError object is used to display detailed information of any error that occurs in scripts in an ASP page. Note: The ASPError object is created when Server. GetLastError is called, so the error information can only be accessed by using the Server. GetLastError method.

What is an ASP 500 error?

The 500 Internal Server Error is a very general HTTP status code that means something has gone wrong on the website's server, but the server could not be more specific on what the exact problem is.

How do I show 500 error in IIS?

To view the actual error message description, in IIS Manager, expand the server node, expand Sites, select Default Web Site, and in the IIS section, double-click the Error Pages icon. The list of error codes and related IIS error pages are displayed. Right-click 500, and then click Edit Feature Settings.


1 Answers

Classic ASP has always returned a 500.100 status if there is a script error. It's been like for a very long time in previous versions of IIS and the behaviour hasn't changed.

If you want to catch Classic ASP script errors and be able to read the Server.GetLastError() object in your custom error page (say for logging) you need to provide a handler specifically for 500.100.

If you don't specify a custom 500.100 error then IIS will fall back to your custom (or its own) 500 error page but Server.GetLastError() won't provide any useful information about the error.

like image 57
Kev Avatar answered Sep 22 '22 23:09

Kev