Custom error handling Asp .Net
- by lidermin
Hi, I have a doubt:
On my web application, I had configured my web.config file to set customerrors to ON, so here it is:
<customErrors mode="On" defaultRedirect="Error.aspx">
<error statusCode="403" redirect="Error.aspx" />
<error statusCode="404" redirect="Error.aspx" />
</customErrors>
For explaining propouses I only captured the 403 and 404 error (and the defaultRedirect obviouly). But I would like to get more details of the error on the page: Error.aspx somehow; but not creating each page for each kind of error. Is there a way to include certain code on my error page (Error.aspx) to get the detail of what raised that error?.
Hope myself clear. Thanks
PD. I'm using C#.