Mobile app version of vmapp.org
Login or Join
Candy875

: How do I configure IIS 7.5 to allow using a network share as an image src? I have a web application that will be used internally that points to images on a network drive. It works when

@Candy875

Posted in: #AspNet #Iis #Iis7

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.

10.03% popularity Vote Up Vote Down


Login to follow query

More posts by @Candy875

3 Comments

Sorted by latest first Latest Oldest Best

 

@Correia994

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

10% popularity Vote Up Vote Down


 

@Ann8826881

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:


Go to:
Control Panel -> Programs and Features -> Turn Windows features on or off
Check Static Content under:
Internet Information Services -> World Wide Web Services -> Common HTTP Features




Also, see the second answer to this related question.

10% popularity Vote Up Vote Down


 

@Connie744

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

<img src="file://///server01fsharedir1dir2my_img.jpg" />


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

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme