protected void Application_Start(object sender, EventArgs e) { // 1. 注册路由 RouteTable.Routes.Add(CustomRouteGenerator.GetRoute <Login>("login")); RouteTable.Routes.Add(CustomRouteGenerator.GetRoute <Users>("users")); RouteTable.Routes.Add(CustomRouteGenerator.GetRoute <Captcha>("captcha")); RouteTable.Routes.Add(CustomRouteGenerator.GetRoute <Logoff>("logoff")); Logging.Setup(log4net.Core.Level.All); }
private void Register() { // 1. Register Routes RouteTable.Routes.Add(CustomRouteGenerator.GetRoute <MyFirstHttpHandler>("MyFirstHttpHandler")); RouteTable.Routes.Add(CustomRouteGenerator.GetRoute <MyFirstAsyncHttpHandler>("MyFirstAsyncHttpHandler")); RouteTable.Routes.Add(CustomRouteGenerator.GetRoute <MyFirstAsyncHttpHandler>("")); // 2. Register Logging Logging.Setup(log4net.Core.Level.All); }