Is the "ASPError" object just a myth?

I have been trying in vain to use the ASPError object in my ".asp" web scripts (We have IIS6 installed). I have seen numerous examples online and though I copy and paste them exactly, the ASPError object always returns blank values. Here's something I tried:


on error resume next

x = 4/0 'this should crash it


set aspErr = server.getLastError

response.write aspErr.Number & "<br>" & aspErr.Description & "<br>" & aspErr.Line

on error goto 0


I expected to see information displayed relating to the division by zero error: but the aspErr.Number and AspErr.Line are zero; and the aspErr.Description is blank. Do you get the same result on your IIS server? Can somebody show me some sample code that actually prints the error description? Thanks!


codepunk -- Thanks for the suggestion, but it did not work (I didn't really expect it to, since ASP/VBScript names are always case-insensitive).

2 Answers

Still have questions? Get your answers by asking now.