我升級到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
應該添加的命名空間解決這個問題問題?