c# - how to change area to seprate project by MapRoute in asp.net mvc -


how change area "admin" seprate project maproute in asp.net mvc picture enter image description here

i'm using code:

  namespace app.web     {         public class routeconfig         {             public static void registerroutes(routecollection routes)             {                 routes.ignoreroute("{resource}.axd/{*pathinfo}");                      var route = routes.maproute(                     "admin_default",                     "admin/{controller}/{action}/{id}",                     new { controller = "home", action = "index", area = "admin", id = "" },                     new[] { "app.admin.controllers" }                 );                 route.datatokens["area"] = "admin";                  routes.maproute(                     name: "default",                     url: "{controller}/{action}/{id}",                     defaults: new { controller = "home", action = "index", id = urlparameter.optional }                 );              }         }     } 

but when enter url in browser:http://localhost:27824/admin/home/index => show app.web.controllers->home->index !! (app.admin.controllers->home->index not show !!)

enter image description here

you can't route different project. routes project specific.


Comments