I have setup a custom 404 page and it works fine for all extension except aspx. They go to the servers generic 404 page.
Here is my code...
<httpErrors errorMode="Custom">
<remove statusCode="404" subStatusCode="-1" />
<error statusCode="404" prefixLanguageFilePath="" path="/errors/404.aspx" responseMode="ExecuteURL" />
</httpErrors>
If I add existingResponse="Replace" to the opening httpErrors tag, the custom 404 page will display but it gets placed underneath the generic 404 output.
Id there a way to get rid of the generic 404 output being displayed above my custom 404 output on these aspx pages?