İçeriğe geç

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
Tarih:Hatalar ve Çözümler
Subscribe
Bildir
guest
0 Yorum
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x