I'm trying to set up custom 404 errors on IIS which needs to go to an ASPX page (404.aspx). If I browse the site and go to a nonexistant .aspx page (eg /not-here.aspx, the custom 404 page is used as expected. However if I go to an extensionless URL like /not-here then I just get IIS's own default 404 page served by the static content handler, rather than 404.aspx though ASP.NET
IIS (8.5) is set to "Execute a URL on this site" which is set to /404.aspx
How can I make IIS use the 404.aspx for all 404 errors? This works on our ancient IIS6 server but I can't get it to work on IIS 8.5
In the Error Pages feature, click on Edit Feature Settings. Make sure you have Custom error pages selected as the Error Responses.