If my web.config has:
<customErrors mode="Off" defaultRedirect="CustomErrorPage.aspx">
<error statusCode="401" redirect="~/CustomErrorPage.aspx?statusCode=401" />
<error statusCode="403" redirect="~/CustomErrorPage.aspx?statusCode=403" />
<error statusCode="404" redirect="~/CustomErrorPage.aspx?statusCode=404" />
...
</customErrors>
Now in my CustomErrorPage.aspx, how can I get the stacktrace information similar to how I see that yellow screen error page when there is no custom error page and it is outputted to the browser?
Or, because this is redirecting to the customerrorpage.aspx, is the error essentially lost at this point and I can't access the exception information?
This is a legacy application with complex virtual directories etc. so I can just drop one of those error libraries so easily at this point.