Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Custom error handling

Reply
Thread Tools

Custom error handling

 
 
Dave Bartlett
Guest
Posts: n/a
 
      05-23-2004
How would I go about handling errors in ASP.NET applications such that an
email is automatically sent to system admin with full details of the error
on the page (regardless of whether it was a compiler or runtime error)?


 
Reply With Quote
 
 
 
 
Eric Marvets
Guest
Posts: n/a
 
      05-23-2004
You could use the Application_Error event in the global.asax file to capture
the event and use Server.GetLastError to get the particular error. You
could then use ClearError to clear out the error and redirect to a custom
page. You can also accomplish the same thing, as far as redirection, from
the web.config file.


--
Eric Marvets
Principal Consultant

the bang project

<shameless self promotion>

Email http://www.velocityreviews.com/forums/(E-Mail Removed) for Information on Our Architecture and
Mentoring Services

</shameless self promotion>


 
Reply With Quote
 
 
 
 
Saravana [MVP]
Guest
Posts: n/a
 
      05-24-2004
Check out this support link,
http://support.microsoft.com/?id=308132

--
Saravana
Microsoft MVP - ASP.NET
www.extremeexperts.com



"Eric Marvets" <(E-Mail Removed)> wrote in message
news:eg$(E-Mail Removed)...
> You could use the Application_Error event in the global.asax file to

capture
> the event and use Server.GetLastError to get the particular error. You
> could then use ClearError to clear out the error and redirect to a custom
> page. You can also accomplish the same thing, as far as redirection, from
> the web.config file.
>
>
> --
> Eric Marvets
> Principal Consultant
>
> the bang project
>
> <shameless self promotion>
>
> Email (E-Mail Removed) for Information on Our Architecture and
> Mentoring Services
>
> </shameless self promotion>
>
>



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Custom error handling question Anton Aylward Ruby 2 12-07-2007 07:04 AM
What is the best way for handling Errors & giving Custom Error mes =?Utf-8?B?U3VoYXMgVmVuZ2lsYXQ=?= ASP .Net 0 07-21-2006 12:22 PM
Custom Error Handling Problem /Question Mr Newbie ASP .Net 3 10-01-2005 10:58 AM
Remind me please about custom error handling =?Utf-8?B?dmJNZW50YWw=?= ASP .Net 5 12-10-2004 05:13 PM
Handling errors and not redirecting to a custom error page =?Utf-8?B?Sm9yZ2UgTWF0b3M=?= ASP .Net 2 10-29-2004 06:17 PM



Advertisments