Customize Error Message

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Alex

    Customize Error Message

    Hello,

    When an error occurs, is it possible to customize the message abit? For
    example, currently after Source Error and Stack Trace it shows Version
    Information, but can I add the Machine IP Address and Currently Logged In
    Username to this as well? Possibly even the Server IP? This would greatly
    help us track down where the error message comes from when someone emails or
    prints out the message for us to resolve bugs.

    Thanks ...

    Alex


  • Mark Rae [MVP]

    #2
    Re: Customize Error Message

    "Alex" <samalex@gmail. comwrote in message
    news:evivpub6HH A.2752@TK2MSFTN GP06.phx.gbl...
    When an error occurs, is it possible to customize the message abit? For
    example, currently after Source Error and Stack Trace it shows Version
    Information, but can I add the Machine IP Address and Currently Logged In
    Username to this as well? Possibly even the Server IP? This would
    greatly help us track down where the error message comes from when someone
    emails or prints out the message for us to resolve bugs.
    I do this in a global ErrorHandler method which not only includes the
    details you mentioned but also things like the entire ServerVariables
    collection etc...

    This is then emailed to me, and ASP.NET (having caught the exception)
    redirects to a friendly page telling the user that an error occurred and
    that the webmaster has been informed etc...


    --
    Mark Rae
    ASP.NET MVP


    Comment

    Working...