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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T09:17:50+00:00 2026-05-23T09:17:50+00:00

When I deploy my mvc app I am having difficulty getting my paths to

  • 0

When I deploy my mvc app I am having difficulty getting my paths to work correctly when moving between pages (views).

Basically in my development environment my landing page is localhost:1910/ whereas when I deploy it, my landing page is localhost/ITSMngr.

Therefore all my links keep missing the ITSMngr section. eg If I have a link such as:

<a href="/DataBaseMng/Edit?id=@signData.SignDataId" >

where DataBaseMng is the name of a controller and Edit the action, it works fine in my dev environment because it will ultimately map it to localhost/DataBaseMng/Edit?id=2 or something. Whereas when deployed it will try to map to the same path but won’t work because it misses the ITSMngr section. ie it should map to localhost/ITSMngr/DataBaseMng/Edit?id=2

Is there a way to set that up by default somewhere so it always will put in ITSMngr for me? I’ve tried changing the map routes in Global.asax.cs but it doesnt’ work – not that I’m 100% convinced I’m doing it correctly.

Removing the / at the beginning of my links will work once, but when you navigate back again, it’s internal paths are all shot and it might lo

  • 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-23T09:17:50+00:00Added an answer on May 23, 2026 at 9:17 am

    In an MVC application you should use the built-in functions to generate URLS instead of hard coding them. This should take care of it all for you, and make use of the Routes defined in your global.ascx

    Instead of:

    <a href="/DataBaseMng/Edit?id=@signData.SignDataId" >
    

    Use:

    <a href="@Url.Action("Edit", "DataBaseMng", new { id = signData.SignDataId })" >
    

    If you want to reference something using the Url rather than the Action helper method (not really recommended) then use:

    @Url.Content("~/DataBaseMng/Edit?id=" + signData.SignDataId.ToString())
    

    Note the ~ which asp .net will map to wherever you’ve installed the application

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

Sidebar

Related Questions

I am trying to deploy an asp .net MVC app onto II7 and getting
I'm hit a problem when attempting to deploy a MVC app as a sub-application
I have an interesting situation where I need to deploy an ASP.NET MVC app
So we're having some issues deploying an ASP.NET MVC app to a client site.
I'm trying to deploy an ASP.NET MVC 2 app using MsDeploy. I use VS2010
I have an asp.net MVC App that I want to deploy to IIS 5
I am trying to deploy my MVC app on a subdomain, unfortunately I get
It would be useful for example to deploy an asp.net mvc app in iis
I'm trying to deploy my mvc app into my large web application. I have
I'm trying to deploy an MVC app to a server which is running IIS

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.