The controller for path was not found or does not implement IController

前端 未结 20 2478
一个人的身影
一个人的身影 2020-11-29 20:50

I have an MVC4 project with language selection:

  • en
  • nl
  • fr
  • de

1 main part with:

  • About
  • Common (fo
20条回答
  •  -上瘾入骨i
    2020-11-29 21:38

    In my case in global.asax/application_start method, I was registering web api routes AFTER mvc routes like so:

    RouteConfig.RegisterRoutes(RouteTable.Routes);
    GlobalConfiguration.Configure(WebApiConfig.Register);
    

    Reverting the order fixed the issue

    GlobalConfiguration.Configure(WebApiConfig.Register);            
    RouteConfig.RegisterRoutes(RouteTable.Routes);
    

提交回复
热议问题