如何从带有 ninject 的区域获取控制器



http://site.com/Admin/User/Index

管理员 - 区域。

我需要:

get controller Account (path /site.com/AccountController)

@Html.操作链接("登录"、"登录"、"帐户")

这给了我以下错误:

"The IControllerFactory 'Web.Infrastructure.NinjectControllerFactory'"
"未返回名称"帐户"的控制器。"

使用 Ninject.MVC3 扩展,而不是编写自己的NinjectControllerFactory。它支持区域。https://github.com/ninject/ninject.web.mvc/wiki/MVC3

最新更新