Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Multiple types were found that match the controller named 'Home'

I've just started using dotnetopenauth for my user registration. It's great, and is working perfectly.

The problem is now I'm getting an error when I try to go to /Home/ which says:

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: OpenIdRelyingPartyMvc.Controllers.HomeController
YourApp.Controllers.HomeController

The problem is, I have no idea where OpenIdRelyingPartyMvc.Controllers.Homecontroller is coming from. I can't find ANY instance of "OpenIdRelyingPartyMvc" anywhere in my app, save 2 places, both of which occur in the UsersController:

OpenIdRelyingParty openid = new OpenIdRelyingParty();

I've tried deleting the DLL and rebuilding the app - no change. I can't figure out where this other controller would be.

Any ideas?

like image 539
andrewheins Avatar asked Jan 29 '26 06:01

andrewheins


1 Answers

I had the same error message after changing the name and default namespace of the project.

Finally the solution was to manually delete all the files from debug -folder ("Clean Solution"-function of VS didn't help in this case).

like image 58
Antti Avatar answered Feb 01 '26 02:02

Antti



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!