Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Parent's Page_Error event handler
Message
De
17/08/2007 11:31:58
 
 
À
14/08/2007 23:34:47
Information générale
Forum:
ASP.NET
Catégorie:
Autre
Divers
Thread ID:
01248186
Message ID:
01248782
Vues:
22
If you include your .PDB files with .DLL files when you deploy, it will be able to know what the line number is.

~~Bonnie






>Hi all,
>
>Initially, I had the following codes in each of my aspx to log the exception into a text file. After I created a parent class with the Page_Error event and changed the aspx to inherit the base page, I found the error line # is not captured whenever the exception occurs (after deployment), but working for debug mode. Kindly advise, thanks.
>
>
>    ''' <summary>
>    ''' Page Error handler
>    ''' </summary>
>    Protected Sub Page_Error(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Error
>        Try
>            Dim ex As Exception = Server.GetLastError().GetBaseException
>            ErrorLog.GenererateLog(ex.TargetSite.Name, ex.Message, ex.Source, ex.StackTrace, Me.Form.Controls)
>            Server.ClearError()
>        Catch excpt As Exception
>
>        End Try
>        Response.Redirect("Error.aspx")
>    End Sub
>
Bonnie Berent DeWitt
NET/C# MVP since 2003

http://geek-goddess-bonnie.blogspot.com
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform