How to resolve multiple controller error when using ASP.NET sitemap provider

ladder

New Member
I am using ASP.NET MVC3 and ASP.NET MVC Sitemap Provider.I have a controller named Application. I also have an area called Administration. In the administration area I also have a controller called Application.The first application controller is for normal website users. The other application controller is intended for administrators.I would like my URLs to display as such:\[code\]/Application/1001/Notes/Administration/Application/1001/Notes\[/code\]The route registration that I have for the 2 above URLs are as such:\[code\]Routes.MapRoute("ApplicationNote", "{controller}/{applicationId}/Notes", new { controller = "Application", action = "Notes" }, new { applicationId = @"\d+" }, new[] { "MyProject.Web.Controllers" });Routes.MapRoute("AdminApplicationNote", "{area}/{controller}/{applicationId}/Notes", new { area = "Administration", controller = "Application", action = "Notes" }, new { applicationId = @"\d+" }, new[] { "MyProject.Web.Areas.Administration.Controllers" });\[/code\]When I run my application and go to any of the action methods in the application controller then I get an error here:\[code\]@Html.MvcSiteMap().SiteMapPath()\[/code\]And the error is:\[code\]Found multiple controllers:Application\[/code\]Here is a partial view of my sitemap configuration:\[code\] <mvcSiteMapNode title="About" area="" controller="Home" action="About" /> <mvcSiteMapNode title="Applications" area="" controller="Application" action="Index" key="ApplicationIndex"> <mvcSiteMapNode title="Create Application" area="" controller="Application" action="Create" /> <mvcSiteMapNode title="Applications List" controller="Application" area="" action="List" /> </mvcSiteMapNode> <mvcSiteMapNode title="Administration Dashboard" area="Administration" controller="Dashboard" action="Index"> <mvcSiteMapNode title="Users Dashboard" area="Administration" controller="User" action="List" /> </mvcSiteMapNode>\[/code\]How would I resolve this? if I remove the route called AdminApplicationNote the other application URLs display correctly. But then I can get the 2nd area route to work as intended.
 
Back
Top