Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7982725
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T10:45:26+00:00 2026-06-04T10:45:26+00:00

I am having trouble trying to get a route working in an area I

  • 0

I am having trouble trying to get a route working in an area I have.

My area is called ABC and I have a controller called Home within the area. I am able to hit the breakpoint with Home/Index if I browse “http://localhost:8000/abc” however when I try hit another action called details like “http://localhost:8000/ABC/details” I get a 404.

I have tried

context.MapRoute(
           "details",
           "ABC/Home/{action}/{id}",
           new { action = "details", id = UrlParameter.Optional },
             constraints: null,
           namespaces: new[] { "WebApplication.Areas.ABC.Controllers" }

       );



        context.MapRoute(
          "ABC_Home",
          "ABC/{controller}/{action}/{id}",
          new { controller = "home",action="Index", id = UrlParameter.Optional },
            constraints: null,
            namespaces: new[] { "WebApplication.Areas.ABC.Controllers" }
      );

This allows me to hit the action if I use “http://localhost:8000/ABC/Home/Details”

 context.MapRoute(
           "details",
           "Home/Home/{action}/{id}",
           new {controller="home", action = "details", id = UrlParameter.Optional },
             constraints: null,
           namespaces: new[] { "WebApplication.Areas.ABC.Controllers" }

       );

Ideally I don’t want to use home within the url if possible. What am I doing wrong?

Any help would be awesome!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-04T10:45:28+00:00Added an answer on June 4, 2026 at 10:45 am

    I think you would just need a single route for this. Don’t include the controller in the route, since it seems to be implied by starting with /ABC; just assign the controller as a default value:

    context.MapRoute(
        "ABC_Home",
        "ABC/{action}/{id}",
        new { controller = "home", action="Index", id = UrlParameter.Optional },
        constraints: null,
        namespaces: new[] { "WebApplication.Areas.ABC.Controllers" }
    }
    

    Per your requirements, this will route /abc to /home/index, and will route /abc/details to /home/details.

    Then, if you need to access other controllers you can add another rule for that, something like the default one:

    context.MapRoute(
        "Default_Route",
        "{controller}/{action}/{id}",
        new { id = UrlParameter.Optional }
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm having terrible trouble trying to get a navigation controller up-and-running. Basically, I want
I'm trying to get an admin interface working in Rails, but I'm having trouble
I'm having trouble trying to get my class working in my node.js file. When
I am having trouble trying to get some replaces working with my regex. Here
I'm having trouble trying to get a linebreak included in a Stringbuilder to appear
I am having trouble trying to get iterators for inner sub-containers. Basically imagine this
I am having trouble trying to get NAnt to compile my project, which consists
I am having trouble trying to get a group of li tags to align
I'm brand new to C++ and am having trouble trying to get a function
I am having serious trouble with trying to get all the forms on a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.