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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T17:18:20+00:00 2026-05-13T17:18:20+00:00

I have several mvc applications on the same domain, each have their own directory.

  • 0

I have several mvc applications on the same domain, each have their own directory.

mydomain.com/app1
mydomain.com/app2
etc..

When using Url.Content() and Url.Action() when at the root level, ‘app1’ part is repeated twice in the urls.

// code used to generate the links
<%= Url.Action("tetris", "Apps") %>
Page Url:               mydomain.com/app1/
rendered link (broken): mydomain.com/app1/app1/Apps.aspx/tetris

application root appears twice in the rendered url when at the root directory
Page Url:               mydomain.com/app1/home.aspx/
rendered link (works):  mydomain.com/app1/Apps.aspx/tetris

application root appears once - everything works as expected 

my routes – I’m using the routes from Phil haacks blog post

routes.MapRoute(
    "Default",
    "{controller}.aspx/{action}/{id}",
    new { action = "Index", id = "" }
);

routes.MapRoute(
    "Root",
    "",
    new { controller = "Home", action = "Index", id = "" }
);

Any ideas?

  • 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-13T17:18:20+00:00Added an answer on May 13, 2026 at 5:18 pm

    That is because applications process web.configs in order of inner most director to outer most directory.

    You have two options to fix this behavior.

    1. Specify the namespaces you want the routes to apply to either in the root directory or your sub-directories. http://msdn.microsoft.com/en-us/library/dd504958.aspx

      routes.MapRoute(
      “Root”, “”, new {…},
      new[] { “MyNamespace.For.Root” }
      );

    2. Or in the root directory specify your sub-directories as ignored routes using. http://msdn.microsoft.com/en-us/library/dd505203.aspx

      routes.IgnoreRoute(“/app1”);
      routes.IgnoreRoute(“/app2”);

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

Sidebar

Related Questions

I have several ASP.NET MVC 3 Web applications that have a lot of common
I have several Silverlight, WP7 and ASP.NET MVC client applications Most allow anonymous access
I have an MVC application that needs to run several tillion calculations. Of those,
ASP.Net MVC Controllers have several methods of forwarding control to another controller or action.
I have several performance issue in my website. I'm using asp.net mvc 2 and
I have a Solution with several projects in it, including two asp.net mvc projects
I have several divs with id=scroll_1, scroll_2, scroll_3, etc... When any of these divs
I have an MVC application with a single model and several views (something like
i have a asp.net mvc application which uploads several xml files that are used
I have several controllers in a spring mvc application. They are regular beans that

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.