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 7044855
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T02:27:33+00:00 2026-05-28T02:27:33+00:00

So I have this route mapped: routes.MapRoute( Solutions, {lang}/Solutions/{controller}/{action}, new { lang=en-US, controller =

  • 0

So I have this route mapped:

routes.MapRoute(
     "Solutions",
     "{lang}/Solutions/{controller}/{action}",
     new { lang="en-US", controller = "WhatWeDo", action = "Index"}
    );

When I go to”

/en-GB/Solutions/SolutionA/Index/

It routes just fine, but

/en-GB/Solutions/SolutionA/

Doesn’t route at all. However, if I take out the lang parameter, so the route looks like

routes.MapRoute(
     "Solutions",
     "Solutions/{controller}/{action}",
     new { controller = "WhatWeDo", action = "Index"}
    );

and I go to

/Solutions/SolutionA/

It routes just fine. Any ideas? I’d like to not have to specify the default action all the time for this route. Thanks.

  • 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-05-28T02:27:34+00:00Added an answer on May 28, 2026 at 2:27 am

    What order are you defining your routes in global.asax, this could have something to with the issue but my initial guess is that it’s matching the default route as such

    controller: en-GB  
    action: Solutions
    id : SolutionA
    

    What you might be able to do is setup some sort of regular expression matching on your routes to exclude your language from the “default” route? Try this link for more information about using regex for route filtering http://www.iridescence.no/post/Defining-Routes-using-Regular-Expressions-in-ASPNET-MVC.aspx

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have this route: routes.MapRoute(null, Users/{id}/Summary, new { controller = Users, action = GetSummary
I have this sole route in my app: routes.MapRoute( Default, {controller}/{action}/{id}, new { controller
Lets say we have this route: routes.MapRoute( Library, Lib/{id}/{lang}, New With {.controller = MyLibrary,
i have routes.MapRoute(BuildingCompanyProject, BuildingCompany/{projectId}/BuildingProject, new { controller = BuildingProject, action = Index, projectId =
I have this route routes.MapRoute( ViewGames, // Route name psp/{controller}/{action}, // URL with parameters
Having this route: map.foo 'foo/*path', :controller => 'foo', :action => 'index' I have the
If we use this standard route: routes.MapRoute( Default, // Route name {controller}/{action}/{id}, // URL
ASP.NET MVC routes have names when mapped: routes.MapRoute( Debug, // Route name -- how
I have this route declaration: routes.MapRoute( // Route name WhiteLabelPartners, // URL with parameters
I have this route: {controller}/{id}/{action} Because I think it makes more sense from RESTful

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.