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

Posted hofmann

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了同一个项目中使用MVC控制器和WebAPI控制器相关的知识,希望对你有一定的参考价值。

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

 

以上是关于同一个项目中使用MVC控制器和WebAPI控制器的主要内容,如果未能解决你的问题,请参考以下文章