I want to add custom error pages to my site. Firstly I have created a test web project, added two test pages, publish it to my local IIS and configured the web.config:
<configuration>
<system.web>
<compilation targetFramework="4.0" />
<customErrors mode="On" defaultRedirect="http://localhost:10000/apperror.aspx">
<error statusCode="404" redirect="http://localhost:10000/404.aspx" />
</customErrors>
</system.web>
I can browse this pages separately but when I try to access a not found page like:
It works perfect and redirects to my error page. But when I try below
IIS is showing his own error page not my custom error pages. I have searched but not found a solution, Could you please help me how can I achieve this?

