I’ve encountered strange behavior an can’t find what is going on, hope somebody will give an idea.
So there is simple and standard route map:
routes.MapRoute("Category",
"category/{categoryName}/{id}",
new {
controller = MVC.PublicProduct.Name,
action = MVC.PublicProduct.ActionNames.Index,
id = 1
});
thing is, that instead of generating this:
http://staging/category/sunglasses/14
it gives:
http://staging/?action=index&controller=publicproduct&id=14&categoryname=sunglasses
strange things are:
1) if I enter right url into address bar, it works
2) it behaves so only in staging, on local machine (also IIS7) and production, it works as supposed, so I guess it is some kind of IIS setting.
UPDATE:
One of samples how url’s are generated:
<a href="@Url.Action(MVC.Basket.Index())">My Cart</a>
Deleting site from IIS and disk and creating fresh one solved the problem, luckily this was staging, so no one was harmed.