对于我最初对调用堆栈/反编译的深入研究,它似乎是由MvcRouteHandler启动的,然后它将构造MvcHandler。然而,我似乎找不到MvcRouteHandler注册的地方。更新我相信在这一行代码中找到了关键:
Route route = new Route(url, new MvcRouteHa
我试着回到app.UseMvc(),因为它仍然在框架中,但是MvcRouteHandler似乎已经不存在了 app.UseMvc(routes => routes.DefaultHandler= new MvcRouteHandler(); //The type of namespace could not be found "admin
然而,我在实现它时遇到了一个问题,因为它似乎是以前版本的.NET核心的演练,并且我得到了'MvcRouteHandler' does not contain a constructor that takes下面是我从中得到错误的代码:
public class AreaRouter : MvcRouteHandler, IRouter //the error happens in this line, visual