会出现如下错误”找到多个与名为“home”的控制器匹配的类型
 
在RouteConfig文件中添加命名空间可解决
 
routes.MapRoute(
                name: "Default",
                url: "{controller}/{action}/{id}",
                defaults: new { controller = "Home", action = "Index", id = UrlParameter.Optional },
                namespaces: new string[] { "Letter.Web.Controllers" }
            );

相关文章:

  • 2022-02-19
  • 2022-01-18
  • 2021-10-04
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-01-30
猜你喜欢
  • 2022-12-23
  • 2021-05-21
  • 2022-12-23
  • 2021-10-26
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案