I setup my custom principal in one of the modules that handles Authentication_Request. Then I set it HttpContext.User. That sets my HttpContext.User and Thread.CurrentPrincipal. Now when an error occurs and customErrors section contains "ResponseRewrite", Thread.CurrentPrincipal is reset to generic principal on my ASPX error page., but my HttpContext.User still contains my custom principal. This does not happen if customErrors section contains "ResponseRedirect". Is this expected behavior?