ASP.NET MVC MapRoute problem
- by MaxFX
Default ASP.NET MVC project has one MapRoute like
routes.MapRoute(
"Default",
"{controller}/",
new { controller = "Home", action = "Index" }
);
And urls like these are equivalent: www.mysite.com, w*ww.mysite.com/home*, www.mysite.com/home/index
But if I trying to use a MapRoute like
routes.MapRoute(
"Sitemap",
"{contoller}/{action}",
new { controller = "Sitemap", action = "ShortMap" }
);
and test url www.mysite.com/sitemap I recieve error 404 but I'm expecting that it's work like www.mysite.com/sitemap/shortmap
How to write this MapRoute correctly?