11

I have very basic routing:

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

The problem is that it works perfectly in all simple cases, like www.xxx.yy/pages/filter/test". As soon as I add dot "." to {id} part it fails, returning 'The resource cannot be found.' It happens for www.xxx.yy/pages/filter/test.

Any suggestions?

TotPeRo
  • 6,561
  • 4
  • 47
  • 60
michal zygula
  • 183
  • 2
  • 8
  • 1
    possible duplicate of ["The resource cannot be found." error when there is a "dot" at the end of the url](http://stackoverflow.com/questions/429963/the-resource-cannot-be-found-error-when-there-is-a-dot-at-the-end-of-the-ur) – Dylan Corriveau Jul 30 '14 at 12:45

2 Answers2

5

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

See: Dots in URL causes 404 with ASP.NET mvc and IIS.

Community
  • 1
  • 1
romanoza
  • 4,775
  • 3
  • 27
  • 44
2

Have a look at this post: "The resource cannot be found." error when there is a "dot" at the end of the url

Community
  • 1
  • 1
Charlino
  • 15,802
  • 3
  • 58
  • 74