Take the 2-minute tour ×
Webmasters Stack Exchange is a question and answer site for pro webmasters. It's 100% free, no registration required.

I have a web application that will be used internally that points to images on a network drive.

It works when I test it in VS, but the images don't load once published.

I'm sure it's a setting in IIS but I can't figure out what it is.

Each computer is already logged into the domain, and those who have access should be allowed to view the image.

I tried changing the authentication to impersonate, but no luck.

share|improve this question

2 Answers 2

For a URL, you need to escape the slashes and specify a protocol (file:// in this case). Example:

    <img src="file://///server01\fshare\dir1\dir2\my_img.jpg" />

Please note that we ended up with 5 slashes after the protocol (file:)

share|improve this answer

You'll need to enable Static Content serving. As stated in Microsoft - Deploying a Static Content Server (IIS 7) for this option:

Static Content
Allows the Web server to publish static Web file formats.

To do this:

  1. Go to:
    Control Panel -> Programs and Features -> Turn Windows features on or off

  2. Check Static Content under:
    Internet Information Services -> World Wide Web Services -> Common HTTP Features


    enter image description here

Also, see the second answer to this related question.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.