So I have spent time on a project involving MVC and have this dreaded issue that many users seem to have with the routing once you change any of the defaults (for instance areas and namespaces). The error is "Multiple types were found that match the controller named"
After a lot of banging my head against the wall, crying and almost throwing my laptop out the window, i came across a web site by <a href ="http://www.johnplummer.com/code/mvc-multiple-types-were-found-that-match-the-controller-named-home.html/comment-page-1#comment-33365">John Plummer</a> which mentioned that VS likes to keep your original executable
from when you first created the project and instead of renaming the executable, it just creates another one. This is one of the usual major issues that this error can created.
Another issue that can cause this is the changing of namespaces and adding areas. If you add the new string to the end of your area registration page like below, it will route your area’s to the correct controllers:
new { action = "Index", id = UrlParameter.Optional }, new string[] { "CISE.UserInterface.Controllers"}
Hope this helps others!!
Thanks, you pointed me in the right direction, although it was simpler to me to just delete the old dlls that VS refused to “clean”
No problem Raul, glad I could help!!
Pingback: Namespace changes with Silverlight 8.1 | Object Reference Hell
This design is spectacular! You certainly know how to keep a reader entertained.
Between your wit and your videos, I was almost moved to start my own blog (well, almost…HaHa!) Excellent job.
I really loved what you had to say, and more than that, how you presented
it. Too cool!
Thank you very much. I haven’t done these in a while, but great to know they are still useful and entertaining:). Your comments actually might inspire me to start it up again!