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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T07:40:18+00:00 2026-05-27T07:40:18+00:00

I have an application in iis available as http://localhost/app/ which means that all relative

  • 0

I have an application in iis available as http://localhost/app/ which means that all relative links created by UrlHelper are resolved as http://localhost/app/???.

Example:
Url.Content("~/images/background.png") resolves into /app/images/background.png

Now the problem is that ISA server adds prefix to the application, so that application is available from outside as http://foo.com/prefix/app/???

Now mvc will handle the request correctly, because it still thinks that the request path is just /app/???, but it won’t generate links with that prefix when using UrlHelper.

So the question is – is there any way to tell MVC to generate links with different virtual path than is defined in iis?

Example:
Url.Content("~/images/background.png") should resolve into /prefix/app/images/background.png

I really don’t want to create own UrlHelper extensions because that won’t affect stuff like Html.ActionLink or RedirectToAction.

  • 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-27T07:40:18+00:00Added an answer on May 27, 2026 at 7:40 am

    You may need to get to the Request Context and modify the URL early in the request pipeline so that by the time UrlHelper fires, Request.RawUrl returns proper path with the prefix. Great question as I will try to come up with a logic sometime soon.

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

Sidebar

Related Questions

I have multiple threads (C# application running on IIS) running that all need to
I have an application running on multiple IIS servers that need to parse a
I have an ASP.NET 2.0 application under IIS that has the functionnality of exporting
I have created an multi thread application on IIS (ASP.NET MVC), When the threading
I have a web application running on Windows IIS. This app has a database
I have one form in a PHP (5.2.9-1) application that causes IIS (Microsoft-IIS/6.0) to
I run an ASP.NET application on IIS 6.0. Usually I have compression turned on
I have a Lucene Index on a central file system. In my IIS application,
I have a asp.net 3.5 application hosted on IIS 7.0. I'm looking for a
I have the following situation: multiple virtual directories under same application pool in 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.