Apr 23, 2018 06:47 AM|murali krishna14|LINK
I am using IIS 10 and vs 2015
I have sample test application it contains sample default.aspx page and Error404.aspx page.
i want to perform if an user requested any 404 resource then i want to redirect to Error404.aspx page.
so that i created sample test application which is working properly on FIleSystem project (http://localhost:16573/)
and i created same application in IIS then it is not working
when i requested any non existing page in my application then it is showing console error instead of redirecting to Error404.aspx page
I wrote below code in web.config file
<httpErrors existingResponse="Replace" errorMode="Custom">
<remove statusCode="404" subStatusCode="-1" />
<error statusCode="404" prefixLanguageFilePath="" path="Error404.aspx" responseMode="ExecuteURL" />
could any one please tell me why it is not working
FYI: I enabled HTTP Erros option in IIS Features from control panel.