标签:
public static void RegisterRoutes(RouteCollection routes) { routes.IgnoreRoute("{resource}.axd/{*pathInfo}"); routes.MapRoute("Defaults", "{controller}/{id}.html", new { controller = "Home", action = "Info", id = UrlParameter.Optional }, new { controller = @"News|Solutions" }, new[] { "Web.UI" }); routes.MapRoute( name: "Default", url: "{controller}/{action}/{id}", defaults: new { controller = "Home", action = "Index", id = UrlParameter.Optional }, namespaces: new string[1] { "Web.UI" } ); }
然后在Web.config 的<system.webServer>节点下添加<modules runAllManagedModulesForAllRequests="true" />
标签:
原文地址:http://www.cnblogs.com/lkd3063601/p/5505775.html