Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

IIS 8.5 Custom 404 not working for extensionless urls

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

like image 464
NickG Avatar asked Nov 02 '22 08:11

NickG


1 Answers

In the Error Pages feature, click on Edit Feature Settings. Make sure you have Custom error pages selected as the Error Responses.

like image 101
Terri Rougeou Donahue Avatar answered Nov 08 '22 03:11

Terri Rougeou Donahue