当你的才华不能撑起你的野心时,就是你该选择学习的时候了!

同一个项目中使用MVC控制器和WebAPI控制器

protected void Application_Start()
        {
            AreaRegistration.RegisterAllAreas();
            GlobalConfiguration.Configure(WebApiConfig.Register);//这个路由注册应该优先注册
            RouteConfig.RegisterRoutes(RouteTable.Routes);
        }

 

posted @ 2020-04-24 01:14  hofmann  阅读(564)  评论(0编辑  收藏  举报