500 Vs 500.100 Error in Classic ASP

折月煮酒 提交于 2019-12-21 12:11:41

问题


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.


回答1:


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.



来源:https://stackoverflow.com/questions/9397160/500-vs-500-100-error-in-classic-asp

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!