How to fix ?
Multiple types were found that match the controller named 'Home'. 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 'namespaces' parameter.
The request for 'Home' has found the following matching controllers: MyProject1.Controllers.HomeController MyProject2.Controllers.HomeController
Probably need a little bit more details. For e.g. Did you change the namespace from MyProject1 to MyProject2?
Check your bin folder to see if any of dlls from the old namespace are still around. If that's the case cleaning them up and recompiling should fix the issue.
Make sure you edit the default namespace setting in your web project properties, on the Application tab.
I assume this is in your Views. Be certain the namespaces in your views is correct.
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