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

前端 未结 20 2477
一个人的身影
一个人的身影 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条回答
  •  無奈伤痛
    2020-11-29 21:14

    In my case namespaces parameter was not matching the namespace of the controller.

    public override void RegisterArea(AreaRegistrationContext context) 
    {
        context.MapRoute(
            "Admin_default",
            "Admin/{controller}/{action}/{id}",
            new {controller = "Home", action = "Index", id = UrlParameter.Optional },
            namespaces: new[] { "Web.Areas.Admin.Controllers" }
        );
    }
    

提交回复
热议问题