I am using both <customErrors> and <httpErrors> in my website. I want to redirect my application to custom error page when bad request, access denied , HTTP Error 404.0 - Not Found requests or .net Error occurs to my website. .Net errors are redirecting fine when I add <cutomErrors> tag into web.config and no other impacts.
<httpErrors errorMode="Custom" >
<remove statusCode="404" subStatusCode="-1" />
<error statusCode="404" prefixLanguageFilePath="" path="http://localhost/mySite/error.aspx" responseMode="Redirect" />
</httpErrors>
When I add the above code its redirecting to error.aspx page on error codes 404, but some weird Authentication timeout is happening from some pages in application, when some postback happens in some pages its logging out the application and going to login page. When I remove this httperrors tag then there is no timeout issues. So can anybody give some guidelines on this?