MVC 路由控制器和动作是保留关键字

MVC routing controller and action are reserved keywords

在MVC路由中controller和action是保留关键字吗? 我的意思是,如果我像下面这样定义路线,系统会崩溃吗? 如果它坏了那为什么?

routes.MapRoute(name: "MyRoute", url: "{cont}/{act}", defaults: new { cont = "home", act = "index" });

routes.MapRoute(name: "MyRoute", url: "{a}/{b}", defaults: new { a= "home", b= "index" });

是的。 asp.net路由中的controller和action是保留关键字。看到这个 (https://docs.microsoft.com/en-us/aspnet/core/fundamentals/routing?view=aspnetcore-3.0#reserved-routing-names)