Customize Error Message

A

Alex

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
 
M

Mark Rae [MVP]

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...
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,236
Members
46,821
Latest member
AleidaSchi

Latest Threads

Top