【发布时间】:2013-09-18 15:00:24
【问题描述】:
我很困惑,我创建了一个名为“Admin”的区域,我有这 2 个控制器:
/admin/users/...
和
/users/..
现在如果我尝试链接到这个网址:
/users/list
我收到此错误:
Multiple types were found that match the controller named 'User'. This can happen if the route that services this request ('{controller}/{action}/{id}') does not specify namespaces to search for a controller that matches the request. If this is the case, register this route by calling an overload of the 'MapRoute' method that takes a
“命名空间”参数。
我很困惑为什么它不起作用,难道它不能确定这个 UserController 是不在区域中的那个吗?
【问题讨论】:
标签: c# asp.net-mvc routes asp.net-mvc-areas