I have a page that I usually get an eplanation as to an error (i.e. Syntax error) but now I only get "Page can not be displayed" Why would that be - anyway to force it to give me the details?
Debugging in classic ASP is always a challenge. What I've done in the past is use the following lines of code (be sure to have On Error Resume Next at the top of your ASP code)...
Code:
Response.Write Err.Description
Response.End
Try inserting those two lines of code in certain places in your ASP page, where you think an error could occur. I would suggest starting near the bottom of your ASP page, then running/opening the page. If the "Page Cannot be displayed" error shows, cut those two lines of code, then paste them up a bit higher in your page, and repeat until you get some meaningful error detail. This will help you to find where your error is occuring.
Another thing you could do is to place the following block of code after operations that may cause errors (again, On Error Resume Next should appear at the top of your ASP code)...
Code:
If Err.Number <> 0 Then
Response.Write "ERROR: " & Err.Number & "<br>" & Err.Description & "<br>" & "Please contact IT for assistance."
Response.End
End If
This will give your users some "friendly" help with errors, rather than presenting the "Page cannot be displayed" page.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.