By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,330 Members | 1,397 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,330 IT Pros & Developers. It's quick & easy.

Receiving Error eMails...

P: n/a
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.

May 18 '06 #1
Share this Question
Share on Google+
5 Replies


P: n/a
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

May 18 '06 #2

P: n/a
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!

May 18 '06 #3

P: n/a
I guess my big question is, how do I get the source error and souce
file information from the error?

May 18 '06 #4

P: n/a
It's located into Exception.Message if only you not override it by you
InnerException property

"da******@gmail.com" wrote:
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
May 18 '06 #5

P: n/a
Thanks. I think I have just about got it to the point I need.

Take Care!

May 18 '06 #6

This discussion thread is closed

Replies have been disabled for this discussion.