An academic question right now, but my curiosity has been piqued.
Is there any way to capture the HTTP sub-code, if any, when writing a custom error page? The customErrors
block in web.config
allows only for integer status, so I cannot distinguish between, say, 403.4 and 403.14. And I haven't been able to find an exception with this information that I could intercept in Application_Error
. Specifically, I would like to redirect all 403 errors to a single page and have that one page describe the specific "Access Denied" error.
Is this possible?