Change route collection of MVC6 after startup
问题 In MVC-5 I could edit the routetable after initial startup by accessing RouteTable.Routes . I wish to do the same in MVC-6 so I can add/delete routes during runtime (usefull for CMS). The code to do it in MVC-5 is: using (RouteTable.Routes.GetWriteLock()) { RouteTable.Routes.Clear(); RouteTable.Routes.IgnoreRoute(\"{resource}.axd/{*pathInfo}\"); RouteTable.Routes.MapRoute( name: \"Default\", url: \"{controller}/{action}/{id}\", defaults: new { controller = \"Home\", action = \"Index\", id =