http://site.com/Admin/User/Index
管理员 - 区域。
我需要:
get controller Account (path /site.com/AccountController)
@Html.ActionLink("登录"、"登录"、"帐户")
这给了我以下错误:
“IControllerFactory 'Web.Infrastructure.NinjectControllerFactory'”
“没有返回名称为 'Account' 的控制器。”
http://site.com/Admin/User/Index
管理员 - 区域。
我需要:
get controller Account (path /site.com/AccountController)
@Html.ActionLink("登录"、"登录"、"帐户")
这给了我以下错误:
“IControllerFactory 'Web.Infrastructure.NinjectControllerFactory'”
“没有返回名称为 'Account' 的控制器。”
使用 Ninject.MVC3 扩展而不是编写自己的NinjectControllerFactory. 它支持区域。https://github.com/ninject/ninject.web.mvc/wiki/MVC3