I develop a web application with ASP.NET MVC. I have problem with route.
I need a route like this. http://localhost/content-name/23.html
I've defined a route for this as follows
//i need this route but it's not work
routes.MapRoute(
"GetContent",
"{sefLink}/{contentId}.html",
new { controller = "Content", action = "GetContent" },
new[] { "CanEcomm.Controllers" });
But the route doesn't work. IIS is showing me 404 page. When i remove .html extension so the route works.
//this route is working. i just remove ".html" extension
routes.MapRoute(
"GetContent",
"{sefLink}/{contentId}",
new { controller = "Content", action = "GetContent" },
new[] { "CanEcomm.Controllers" });
How can i solve this? Thank you