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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T14:55:16+00:00 2026-06-12T14:55:16+00:00

Ive been developing a web application (asp.net mvc) in VS 2012 and its been

  • 0

Ive been developing a web application (asp.net mvc) in VS 2012 and its been running along swimmingly. I have now gone to deploy it to my computers IIS just to run some tests outside VS and Ive come up with some issues.

The issues relate to how images and JS files are linked to. The simplest example of the problem is an image src. So in my site.css I have the following style:

.menu_div .mnuHeader
{  
     background: url('/img/menuSectionHeader.png') repeat-x center;     
 }

This works fine in the development environment because the VS IIS express instance spins it up as “http://localhost:51034/”. But when I have it deployed to IIS the website is located in a virtual directory so the website is referenced as “http://localhost:80/MyWebsite/”.

So unless I go through my entire application and change it to /MyWebsite/ than images and resource links will not work (This isnt really feasible as I will have to have two different instances of the application, one for dev and one for deployment, a bit dangerous for just links).

Am I missing something here?

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-06-12T14:55:17+00:00Added an answer on June 12, 2026 at 2:55 pm

    Why don’t you try relative paths? If CSS file is in /css/ and graphics are in /img/, then your example will be:

    .menu_div .mnuHeader
    {  
         background: url('../img/menuSectionHeader.png') repeat-x center;     
     }
    

    You can also try to rewrite /img/ for /MyWebsite/img/ on production: http://www.iis.net/learn/extensions/url-rewrite-module/creating-rewrite-rules-for-the-url-rewrite-module

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

Sidebar

Related Questions

I have an Asp.Net MVC Web Application that I am developing. I have TeamCity
I've been developing an ASP .NET 3.5 web application against Cassini, the built-in web
I'm developing a web application with asp.net mvc 3 and DDD. For my domain
I've been developing web applications for 2 years now, and have been into simpler
I am developing a web application in ASP.NET MVC3 with C# and Razor. I
I've been developing a django web-application for three months now, and I'd like to
I have being developing web application for well over 4 years now, and am
I am developing a stock/e-commerce web application. We have been using a version of
I've been developing an asp.net web app using VS studio. I'm using SQL Server
I've been developing Web applications for a while now and have dipped my toe

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.