MvcMusicStore Deployment Issue
I'm trying to deploy the MvcMusicStore on my website, but I'm running into some issues with the page navigation at the top. I'm getting a 404 not found error on these links. I think this is a routing issue, but it works locally. The odd thing is the genre links also work on the page. I've included the link to my deployment site as well as the routing code.
http://mybeatonpath.com/MvcMusicStore"
public static void RegisterRoutes(RouteCollection routes)
{
routes.IgnoreRoute("{resource}.axd/{*pat开发者_开发技巧hInfo}");
routes.MapRoute(
"Default", // Route name
"{controller}/{action}/{id}", // URL with parameters
new {controller = "Home", action = "Index", id = UrlParameter.Optional} // Parameter defaults
);
}
You might need to enable ASP.NET 4.0 on IIS.
Here's how this coud be done in IIS 6.0:
Also you need a wildcard mapping in order to use extensionless urls for IIS 6.0 and IIS 7.0 (Classic mode). In IIS 7.0 Integrated mode you don't need to configure this mapping.
It looks like you might have IIS6 running. You need to make some adjustments so that IIS knows how to handle MVC routing. You need to set up IIS6 Extension-less URLs.
Here is an explanation on how to proceed.
精彩评论