About Application_Error

G

Guest

Hi

I have this in my code:


<customErrors mode="On" defaultRedirect="ErrorPage.aspx" />

When an error happens the page is shown, good!

But now I want to add code to the Application_Error event (cause I want to
send a mail) when I do this my error page is not shown instead a blank page
is shown.


Any sug in order to allow both things to happend.

thks
 
B

Brock Allen

What does Application_Error look like? If all you do in there is log errors
(via EventLog, email, text file, whatever) then you should be fine and get
the best of both worlds. If you call Response.Redirect or Server.Transfer
in Application_Error, then you're circumventing the <customErrors> setting.
 
G

Guest

Ok Thank you for read my post

You make me check my code, and I was using this instrucction inside of the
event:

Server.ClearError();

I think that is the problem

thks.
 

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,777
Messages
2,569,604
Members
45,204
Latest member
LaverneRua

Latest Threads

Top