Asp.net mvc routing when passing parameter contains point

I have a very simple routing:

routes.MapRoute( "Default", "{controller}/{action}/{id}",parameters new { controller = "Home", action = "Index", id = "" } ); 

The problem is that it works great in all simple cases, for example www.xxx.yy/pages/filter/test ". As soon as I add a point". "to the {id} part, it fails, return" Resource not found. "This occurs when www.xxx.yy/pages/filter/test.

Any suggestions?

+6
asp.net-mvc routing
source share
2 answers

Take a look at this post: "Resource not found." when there is a dot at the end of the URL

+2
source share

Just add a slash "/" at the end of the URL: www.xxx.yy/pages/filter/test./

See: Dots in the URL call 404 using ASP.NET mvc and IIS .

+2
source share

All Articles