: 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
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.
More posts by @Candy875
3 Comments
Sorted by latest first Latest Oldest Best
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:
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.
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:)
Terms of Use Create Support ticket Your support tickets Stock Market News! © vmapp.org2024 All Rights reserved.