Logging errors in ASP.NET (MVC) through the Custom Error

Posted by Alex on Stack Overflow See other posts from Stack Overflow or by Alex
Published on 2010-05-07T22:05:33Z Indexed on 2010/05/07 22:08 UTC
Read the original article Hit count: 139

Filed under:

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?

© Stack Overflow or respective owner

Related posts about asp.net-mvc