MVC 4 admin area within separate project
asp.net-mvc, asp.net-mvc-4, c#
Solution
If this route is only declared once in your codebase, clean and rebuild your solution. This can happen if you have "old" dlls (for example if you had renamed a project) in your bin folder, with this route registered.
Problem
I'm building an ASP.NET MVC 4 application and would like to have my site admin area as an MVC Area within a separate project. I've added a new MVC 4 Web Application project to my solution and added the following file to register my area: ``` public class AdminAreaRegistration : AreaRegistration { public override string AreaName { get { return "Admin"; } } public override void RegisterArea(AreaRegistrationContext context) { context.MapRoute( "Admin_default", "Admin/{controller}/{action}/{id}", new { controller = "Home", action = "Index", area = "Admin", id = UrlParameter.Optional }, new[] { "Future.Admin.Controllers" } ); } } ``` However this results in the following error: ``` A route named 'Admin_default' is already in the route collection. Route names must be unique. ``` I've altered the build output path of my admin area project to point to the main site project. Is there something I'm missing or not configured? Any help is much appreciated!