I've seen many similar questions but they all focus on the first part of this task that I have already completed. Please let me know if I missed one that answers my question.
I have an IIS 7.5 server running a ASP .NET MVC5 site. As part of the routes I have added:
routes.MapRoute(
name: "Default",
url:"{*url}",
defaults: new { controller = "Home", action = "NotFound" }
);
This route acts as my 404 action.
In addition in my web.config I have:
<modules runAllManagedModulesForAllRequests="true">
The resut of which is that I now have my 404 defined normally as an MVC action but it responds to all URLs including the following:
/error
/err.or
/e/r/r/o/r
However it came to my attention today that if I try this route it fails:
/error.
That is to say any route that ENDS with a period or dot gives me the the typical:
Server Error in '/' Application.
The resource cannot be found.
Description: HTTP 404. The resource you are looking for (or one of its dependencies) could have been removed, had its name changed, or is temporarily unavailable. Please review the following URL and make sure that it is spelled correctly.
Requested URL: /error.
Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.34280
I have a similar setup in another project and it works for URLs that end in dots but I can't figure out what is different between the two projects. Any ideas what I might be doing wrong? or what's capturing this route? or what's excluding this route from being processed through ASP .Net?