Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>The following should work in your area registration:</p> <pre><code>public override void RegisterArea(AreaRegistrationContext context) { context.Routes.Add( "Admin_default", new Route("Admin/{controller}/{action}/{id}", new RouteValueDictionary( new { action = "Index", id = UrlParameter.Optional } ), null, new RouteValueDictionary( new { area = AreaName } ), new HyphenatedRouteHandler() ) ); } </code></pre> <hr> <p>UPDATE:</p> <p>You seem to be having the same controller name in multiple areas which is not possible without defining a namespace constraint when registering your routes as the error message you are getting suggests you to do.</p> <p>So in your Global.asax:</p> <pre><code>public static void RegisterRoutes(RouteCollection routes) { routes.IgnoreRoute("{resource}.axd/{*pathInfo}"); routes.Add( "Default", new Route( "{controller}/{action}/{id}", new RouteValueDictionary( new { controller = "Home", action = "Index", id = UrlParameter.Optional } ), null, new RouteValueDictionary( new { Namespaces = new[] { "AppName.Controllers" } } ), new HyphenatedRouteHandler() ) ); } </code></pre> <p>and in your AreaRegistration:</p> <pre><code>public override void RegisterArea(AreaRegistrationContext context) { context.Routes.Add( "Admin_default", new Route( "Admin/{controller}/{action}/{id}", new RouteValueDictionary( new { action = "Index", id = UrlParameter.Optional } ), null, new RouteValueDictionary( new { Namespaces = new[] { "AppName.Areas.Admin.Controllers" }, area = AreaName } ), new HyphenatedRouteHandler() ) ); } </code></pre> <p>You might need to adjust the namespace in the constraint to match yours.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload