I get a 404 response from .Net MVC when I try to make a request where my search term ends with a .
(period). This is the route that I'm using:
routes.MapRoute(
"Json",
"Remote.mvc/{action}/{searchTerm}/{count}",
new { controller="Remote", count=10}
);
The search works fine with a .
inside the search term, it just cannot end with it. Any thoughts on how to route this search request?
I have solved a similar issue (I had trouble with paths like /music/R.E.M.) I've added the following line into the system.webServer/handlers section (adjusted for your case):
I've noted also, that
does work only if the period (.) is somewhere in the middle pair of slashes (e.g. /abc/d.e/f) and does not work when the period looks like a file type separator (e.g. /abc/de/f.g).
If you are using .NET 4.0, you can set this flag in the system.web section of your web.config and it will be allowed:
I've tested it and it works. Haack has an explanation of it.