GetLastError

I am trying to capture some information about 404 errors occurring on our website. I have defined a custom error page in IIS5 using the properties of the site. I am creating a 404 error by mistyping an address. The custom 404 page is called, but there is no data in Server.GetLastError.

Code:
Dim objError
Set objError = Server.GetLastError()
strNumber = objError.AspCode
strSource = objError.Category
strPage = objError.File
strDesc = objError.Description

View Replies


ADVERTISEMENT

Err Object VS. GetLastError()

The original programmer of our website put "on error resume next" on
every page to cover up his lack of skill. Many of our pages are
returning errors that we never see.

I want to make a little script that emails me at the occurance of an
error. I copied one that used the Err object but I don't want to use
it because I would like line numbers is the email.

I then copied our custom 500 error page that uses the GetLastError
function but it always seems to be empty, like no error occurred.

The function "If Err Then" returns true so the Err object sees the
error. Why won't GetLastError return the error.

View Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved