对于路径控制器“/”未找到或没有实现一个IController。在nopCommerce [英] The controller for path '/' was not found or does not implement IController. in nopCommerce

查看:259
本文介绍了对于路径控制器“/”未找到或没有实现一个IController。在nopCommerce的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图调用HeaderLinks.cshtml的Razor视图的操作。

I am trying to call an action in HeaderLinks.cshtml razor view.

@Html.Action("SideMenu","Index")

SideMenuController是在我上nopCommerce安装的插件。所有路由还是不错的。

SideMenuController is in a plugin that i installed on nopCommerce. All routing is good.

routes.MapRoute("Nop.Plugin.Other.SideMenu.Log", "sidemenu/index", new { controller = "SideMenu", action = "Index" }, new[] { "Nop.Plugin.Other.SideMenu.Controllers" });

但有一种观点是否显示错误 - 控制器的路径'/'没有被发现,或者不执行一个IController

But the view is showing an error - "The controller for path '/' was not found or does not implement IController."

我也试过与...

@Html.Action("SideMenu","Index",new { area = "" })

结果是一样的。是什么原因造成的,我怎么能摆脱它?

Result is same. What is causing that and how can i get rid of it?

推荐答案

我觉得这是

@Html.Action("Index","SideMenu",new { area = "" })

而不是

@Html.Action("SideMenu","Index",new { area = "" })

这篇关于对于路径控制器“/”未找到或没有实现一个IController。在nopCommerce的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆