我升级到MVC 2,更新了我所有的程序集(也复制到本地)。控制器有问题的错误,升级到MVC 2
我改变了我的路线是:
routes.MapRoute(
"Admin",
"admin/{controller}/{action}/{id}",
new { controller = "Admin", action = "index", id = ""},
new[] { "MyNamespace.Web.Controllers.Admin" } // namespace
);
routes.MapRoute(
"Default", // Route name
"{controller}/{action}/{id}", // URL with parameters
new { controller = "Home", action = "Index", id = "" }, // Parameter defaults
new[] { "MyNamespace.Web.Controllers" } // namespace
);
我的控制器看起来像:
/controllers/admin/ProductController.cs
/controllers/ProductController.cs
我仍然得到错误:
he controller name 'Product' is ambiguous between the following types:
MyNamespace.Web.Controllers.Admin.ProductController
MyNamespace.Web.Controllers.ProductController
应该添加的命名空间解决这个问题问题?