Receiving Error eMails...

  • Thread starter Thread starter dauphian
  • Start date Start date
D

dauphian

Greetings,

Is there a way to receive the information that shows on the default
error page within .net in an email?

I have managed to pull out some pieces using:

mail.Body = "Error Description: " + Server.GetLastError().Data.Values +
" <br /><br /> "
+ Server.GetLastError().Message + " <br /><br /> "
+ Server.GetLastError().Data + " <br /><br /> "
+ Server.GetLastError().StackTrace + " <br /><br /> "
+ Server.GetLastError().InnerException + " <br /><br /> "
+ Server.GetLastError().Source;

But the display and what is output on the web page is a lot cleaner and
easier to read than what I am returning above.

I am using a global error setting for the app vs a page by page.

Thanks in advance.
 
What do u mean by "cleaner and easier to read"?
Just perform html formating like on the error page and http by email, not
the plain text
Greetings,

Is there a way to receive the information that shows on the default
error page within .net in an email?

I have managed to pull out some pieces using:

mail.Body = "Error Description: " + Server.GetLastError().Data.Values +
" <br /><br /> "
+ Server.GetLastError().Message + " <br /><br /> "
+ Server.GetLastError().Data + " <br /><br /> "
+ Server.GetLastError().StackTrace + " <br /><br /> "
+ Server.GetLastError().InnerException + " <br /><br /> "
+ Server.GetLastError().Source;

But the display and what is output on the web page is a lot cleaner and
easier to read than what I am returning above.

--
WBR,
Michael Nemtsev :: blog: http://spaces.msn.com/laflour

"At times one remains faithful to a cause only because its opponents do not
cease to be insipid." (c) Friedrich Nietzsche
 
Thanks for your response...

Basically from comparing what I get in my email, vs what appears on the
actual page, there appear to be a few things that are missing in the
report.

I am just curious if the above way I am trying to get the error is the
best or all that I can receive.

Thanks!
 
I guess my big question is, how do I get the source error and souce
file information from the error?
 
It's located into Exception.Message if only you not override it by you
InnerException property

I guess my big question is, how do I get the source error and souce
file information from the error?

--
WBR,
Michael Nemtsev :: blog: http://spaces.msn.com/laflour

"At times one remains faithful to a cause only because its opponents do not
cease to be insipid." (c) Friedrich Nietzsche
 

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

Back
Top