Multiple types were found that match the controller named…

Multiple types were found that match the controller named ‘Home’. This can happen if the route that services this request…

[highlight]

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.

[/highlight]

 

Şeklinde bir hata almanız halinde projenizdeki RouteConfig içerisinde aşağıdaki gibi bir controller adresi belirtmeyle sorunu düzeltebilirsiniz.


routes.MapRoute("Default", "{controller}/{action}/{id}",
new
{
controller = "Home",
action = "Index",
id = UrlParameter.Optional
}, new[] { "NameSpaceiniz.Controllers" });

Bu kadar basit. İyi çalışmalar…

0 0 votes
Article Rating
Subscribe
Bildir
guest
0 Yorum
Eskiler
En Yeniler Beğenilenler
Inline Feedbacks
View all comments
Proudly powered by WordPress | Theme: Wanderz Blog by Crimson Themes.
0
Would love your thoughts, please comment.x