Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Parent's Page_Error event handler
Message
From
17/08/2007 11:31:58
 
 
To
14/08/2007 23:34:47
General information
Forum:
ASP.NET
Category:
Other
Miscellaneous
Thread ID:
01248186
Message ID:
01248782
Views:
21
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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform