而後打開web程序,訪問ip:port/Help.web
爲何能夠直接輸入Help就能訪問呢,由於這個插件自己已經配置了路徑,以下。api
1 public class HelpPageAreaRegistration : AreaRegistration 2 { 3 public override string AreaName 4 { 5 get 6 { 7 return "HelpPage"; 8 } 9 } 10 11 public override void RegisterArea(AreaRegistrationContext context) 12 { 13 context.MapRoute( 14 "HelpPage_Default", 15 "Help/{action}/{apiId}", 16 new { controller = "Help", action = "Index", apiId = UrlParameter.Optional }); 17 18 HelpPageConfig.Register(GlobalConfiguration.Configuration); 19 } 20 }