Code:
<error statusCode="404" redirect="404Error.aspx" />
When I have included the above line in my webconfig file, control gets half way through application_error in global.asax then jumps out to redirect to 404Error.aspx
I actually want application_error to complete before the redirection and thought the order of processing for errors was:
1. Page_Error
2. Application_Error
3. web.config
The application_error sub completes fine for all other errors, it just seems to redirect too early for 404s for some reason?! Why?!