storing error dumps for later persual

A

apandapion

I have an asp web client I have written that talks to a number of web
services. Currently, I have customErrors set to 'Off', so the detailed
stack dump pops up and I can find the part of my code that is borking.

The client is about to go live. In the event an exception does come up
in a live enviornment, I'd like to display to the client a simple "Damn
it, it doesn't work. Sorry." message. However, I would also like to
take the stack dump that I get with customErrors set to off, and
instead of hitting the user with it, store it in a database for later
persual.

So I want to do a pair of things I currently don't know how to do:

1) Switch to processing errors myself.
2) During that processing, programatically access the stack dump.

Can anyone suggest articles, msdn references, or even just apis for
either of these steps? The first one is easy - the second one perhaps
slightly less so.

TIA
apandapion
 
P

peter kelcey

Use the application_error event in the global.asax.vb class to catch the
error and redirect to a new page that can display your custom message. In
application_error event handler, you can access the error details with the
Server.GetLastError() method. It's got lots of usefull stuff in it like the
stack, error message etc.

Peter Kelcey
 

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,997
Messages
2,570,240
Members
46,828
Latest member
LauraCastr

Latest Threads

Top