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

  • Home
  • SEARCH
  • 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 8578875
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T20:29:34+00:00 2026-06-11T20:29:34+00:00

I got a solution with main page ( Default.aspx) at this location D:\Websites\wwwFlofab\HomeSite\Default\Pages that

  • 0

I got a solution with main page (Default.aspx) at this location "D:\Websites\wwwFlofab\HomeSite\Default\Pages" that is using a master page (Site.Master) at this location "D:\Websites\wwwFlofab\HomeSite\Master\Pages".

When accessing our website we were using a Default.aspx (not the one mentioned above) to redirect to my Default.aspx. That way, when I was typing our url, it was redirecting so instead of getting "http://www.mywebsite.com" I was having something like "http://www.mywebsite.com/HomeSite/Default/Pages/Default.aspx"

I didn’t liked the "/HomeSite/Default/Pages/Default.aspx" to be shown at first loading so I changed my IIS 7.5 default document to "Default/Pages/Default.aspx" to avoid a redirect.

It’s now correctly displayed on first load (http://www.mywebsite.com).

Then I saw something that I do not understand and that’s why I’m posting here 🙂

In my master page, I was having many images that were displayed like this

<img src='~/Styles/images/ASME.png' />

After that IIS default document changed, all these images (in master page) were not showing up (on first load only). To display them correctly, I need to add our url.

<img src='http://www.mywebsite.com/HomeSite/Styles/images/ASME.png' />

Why would my images display correctly on a manual redirect and not when it’s called from IIS?

It’s the same page, same folders, only the url changed.

  • 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-11T20:29:35+00:00Added an answer on June 11, 2026 at 8:29 pm

    You used the “~” sign in your image path but didn’t add runat="server" so the path was sent as is to the client.

    The client took your image path and combined it with the url of the page address, so "http://www.mywebsite.com/HomeSite/Default/Pages/Default.aspx" and '~/Styles/images/ASME.png' resolved in "http://www.mywebsite.com/HomeSite/Styles/images/ASME.png", but when the address is only the host name, then the image url will result in "http://www.mywebsite.com/Styles/images/ASME.png".

    The way to solve it is to add runat="server" to the image, so the server will resolve the correct client url in any case.

    <img runat="server" src='~/Styles/images/ASME.png' />
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I got a solution that includes 3 different projects, a Class Library, a Web
I've got a solution for my webapplication with almost 12 projects and 3 websites.
I always got this error guys on my site.Anybody got a solution. Stacktrace at
Current, I've got a stored procedure that has a main goal of doing a
While using Leiningen, I got the following abrupt error: Exception in thread main java.lang.NoSuchMethodError:
I've got my brand new VS2008 and decided to convert my main solution from
I've got a situation where I have a main form that pops up an
I've got files in TFS that are not showing in the solution explorer of
I've got a solution with many projects One of these proejcts is a MyProject.Web
I've got a Solution with lots of projects and all but one of them

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.