I receive the following error when trying to run my ASP.NET MVC application:
The request for 'Account' has found the following matching controllers:
uqs.Controllers.Admin.AccountController
MvcApplication1.Controllers.AccountController
I searched the project for MvcApplication1.Controllers.AccountController
to remove it, but I can't find a match.
I try to registered a route to fix it:
routes.MapRoute(
"LogAccount", // Route name
"{controller}/{action}/{id}", // URL with parameters
new { controller = "Account", action = "LogOn", id = "" },
new string[] { "uqs.Controllers.Admin" } // Parameter defaults
);
but that didn't solve it.
Multiple types were found that match the controller named 'Account'.
How I can fix this problem?
If you refactor your project and change the default Namespace and Assembly from "MVCApplication1" to "uqs", you may end up with 2 assemblies in your bin directory (the new one and the old one). You can get this error because the AccountController is in both assemblies.
Clean your bin directory of the old MVCApplication1.dll.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With