0

In my web.config I have the following:

<customErrors mode="RemoteOnly" defaultRedirect="/error.aspx"/>

When an error occurs, the user is redirected to /error.aspx?aspxerrorpath=/somepage where I can get user's name, name of the page, date, but... I can't get the error message!

I can get it via the OnException method, but then I won't be able to get the name of the page which is very important for me.

How can I get both the page and the error message?

asked May 7, 2010 at 22:05

2 Answers 2

1

I would suggest you to use
"ELMAH (Error Logging Modules and Handlers) is an application-wide error logging facility that is completely pluggable. It can be dynamically added to a running ASP.NET web application, or even all ASP.NET web applications on a machine, without any need for re-compilation or re-deployment"

http://code.google.com/p/elmah/

answered May 10, 2010 at 8:33
Sign up to request clarification or add additional context in comments.

Comments

0

I solved by using Application_Error method.

More info here:

http://aspnetresources.com/articles/CustomErrorPages.aspx

answered May 8, 2010 at 2:34

Comments

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.