Hi,
Our asp.net webpage has error handling code that emails me details
whenever one occurs.

Lately, we redesigned our site, and since day 1, search bots from
Google and others are throwing errors, but the error handling code
does not seem to catch any details, except the bot name and the
asp.net session id.

Our error handling code is as such:

Each codebehind contains:
************

 Private Sub Page_Error(ByVal sender As Object, ByVal e As
System.EventArgs) Handles Me.Error
        Dim r As New Functions
        r._err()
    End Sub

***********
The _err sub contains:
****************************

Public Sub _err()
            Dim err As Exception =
HttpContext.Current.Server.GetLastError
            HttpContext.Current.Session("errmessage") = err.Message()
            ' HttpContext.Current.Session("errinnerexc") =
err.TargetSite
            HttpContext.Current.Session("errstring") = err.ToString()
            HttpContext.Current.Session("url") =
HttpContext.Current.Request.Url.ToString
            If HttpContext.Current.Request.UrlReferrer IsNot Nothing
Then
                HttpContext.Current.Session("urlreferrer") =
HttpContext.Current.Request.UrlReferrer.ToString

            End If
            HttpContext.Current.Server.ClearError()
            HttpContext.Current.Response.Redirect("error.aspx?ref=" &
HttpContext.Current.Request.Url.ToString)
        End Sub

*******************
and then the error.aspx.vb code emails the session strings from above.

The email from bots is:
Url:
Url Referrer:
Customer's browser: Mozilla/5.0 (compatible; Googlebot/2.1; +http://
www.google.com/bot.html)
Customer's saved session id:
Items in quote cart:
Items in shopping cart:
ASP.net session id: 01jgwe454ouw252mhcaetq55
Does customer's browser accept cookies?: False
Customer's email:

Usually, url and url referrer are provided by the code.

Can anyone help in how to go about finding out why the bots are
getting errors?

Thanks

Reply via email to