troubleshooting Question

Custom Error Page Filter

Avatar of Bob Schneider
Bob SchneiderFlag for United States of America asked on
ASPMicrosoft IIS Web Server
5 Comments2 Solutions761 ViewsLast Modified:
I have a custom 404 error page that is working well.  it sends me emails when a page is not found but I want to filter the errors that it sends me so I have created an array and if the error matches one of the array items it doesn't send.  Here are the ones I am trying to filter:


DontSend(0) = "Query String: 404;http://www.etraxc.com:80/apple-touch-icon-57x57-precomposed.png"
DontSend(1) = "Query String: 404;http://www.etraxc.com:80/apple-touch-icon-precomposed.png"
DontSend(2) = "Query String: 404;http://www.etraxc.com:80/apple-touch-icon-57x57.png"
DontSend(3) = "Query String: 404;http://www.etraxc.com:80/apple-touch-icon.png"
DontSend(4) = "Query String: 404;http://www.etraxc.com:80/apple-touch-icon-114x114-precomposed.png"
DontSend(5) = "Query String: 404;http://www.etraxc.com:80/apple-touch-icon-144x144-precomposed.png"
DontSend(6) = "Query String: 404;http://www.etraxc.com:80/apple-touch-icon-72x72-precomposed.png"
DontSend(7) = "Query String: 404;http://www.etraxc.com:80/apple-touch-icon-precomposed.png"
DontSend(8) = "Query String: 404;http://www.etraxc.com:80/graphics/warning_lights/yellow.gif"
DontSend(9) = "Query String: 404;http://www.etraxc.com:80/graphics/warning_lights/red.gif"
DontSend(10) = "Query String: 404;http://www.etraxc.com:80/verify.authorize.net/anetseal/seal.js"
DontSend(11) = "Query String: 404;http://www.etraxc.com:80/crossdomain.xml"
 
bDontSend = False

If Trim(ErrArray(2)) & "" = "" Then bDontSend = True

If bDontSend = False Then
      For i = 0 To UBound(DontSend)
            If Trim(ErrArray(10)) = DontSend(i) Then
                  bDontSend = True
                  Exit For
            End If
      Next
End If

Unfortunately many of them are still coming through.  Here is an example of what I get in my error report email:

 Query String: 404;http://www.etraxc.com:80/apple-touch-icon-precomposed.png

Any idea as to what I am missing???
ASKER CERTIFIED SOLUTION
neeraj523

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Join our community to see this answer!
Unlock 2 Answers and 5 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 2 Answers and 5 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros