using System.Web.Mvc; namespace HH.WMS.WebUI.Areas.Sys { public class SysAreaRegistration : AreaRegistration { public override string AreaName { get { return "Sys"; } } public override void RegisterArea(AreaRegistrationContext context) { context.MapRoute( "Sys_default", "Sys/{controller}/{action}", new { action = "Index", id = UrlParameter.Optional }, new string[] { "HH.WMS.WebUI.Areas." + this.AreaName + ".Controllers" } ); //context.MapRoute( // //this.AreaName + "default", // //this.AreaName + "/{controller}/{action}/{id}", // "Sys_default", // "Sys/{controller}/{action}/{id}", // new { area = this.AreaName, controller = "Home", action = "Index", id = UrlParameter.Optional }, // new string[] { "HH.WMS.WebUI.Areas." + this.AreaName + ".Controllers" } //); ////GlobalConfiguration.Configuration.Routes.MapHttpRoute( //// this.AreaName + "Api", //// "api/" + this.AreaName + "/{controller}/{action}/{id}", //// new { area = this.AreaName, action = RouteParameter.Optional, id = RouteParameter.Optional, namespaceName = new string[] { string.Format("HH.WMS.WebUI.Areas.{0}.Controllers", this.AreaName) } }, //// new { action = new StartWithConstraint() } ////); } } }