In my web application, I configured the 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>
To explain the motives, I only fixed error 403 and 404 (and, obviously, the default value is Redirect). But I would like to receive more detailed information about the error on the page: Error.aspx somehow; but not creating every page for every type of error. Is there a way to include specific code in my error page (Error.aspx) to get detailed information about what caused this error?
PD. I am using C #.
source share