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.

3 Answers 3


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:)


Have you considered creating a mapped network drive on the local machine that IIS is on (i.e. \NetworkShare mapped to drive letter "X:") with appropriate permissions and then create a virtual directory under your web mapped to the new mapped drive (X:).


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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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