Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium


This Virtual Directory does not allow contents to be listed.

Posted on 2009-02-18
Medium Priority
Last Modified: 2012-05-06
I am passing a dynamic share name to the src attribute of the img tag.  Is there a way to display images from a network share?When I run web tool Fiddler to look at the error. I see "This Virtual Directory does not allow contents to be listed."

<img src="\\sharename\folder\3769.jpg" />

Open in new window

Question by:groovypash
  • 2

Accepted Solution

winthropj earned 90 total points
ID: 23677098
I don't think that will work. What I think you want to do here is create a folder within the wwwroot folder. Point your image tags to this folder as you would any regular image reference in HTML. Then share that folder out to your users. Be careful when assigning permission though as this folder is out on the web.
LVL 22

Assisted Solution

cj_1969 earned 60 total points
ID: 23684467
winthropj I think has the best solution.
This might work but it would depend on how the users are accessing the page that displays the image.
If they are accessing it from a LAN then the browser is going to pass Windows credentials to the shared folder and have to authenticate to get access to the file.  If they are on the Internet, then they would have to do the same thing but it will not work.

All this assuming that using a share reference for an IMG statement is valid syntax.

Author Closing Comment

ID: 31548575
I got it working by impersonating the user to access the folders
LVL 22

Expert Comment

ID: 23693181
FYI ... Impersonization is a server side coding technique;  If you are impersonating the user then you are accessing the file from the server and not embedding the tag into the HTML to be resolved on the client machine.  

Either way, I'm glad you got it working.

Featured Post


Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Here are the symptoms: You start receiving calls from users that one of your legacy web apps isn't coming up, so you log into your IIS 5 server to check it out.  When you pull up the services, you notice that the WWW Publishing service isn't runn…
Preparing an email is something we should all take special care with – especially when the email is for somebody you may not know very well. The pressures of everyday working life stacked with a hectic office environment can make this a real challen…
In a question here at Experts Exchange (https://www.experts-exchange.com/questions/29062564/Adobe-acrobat-reader-DC.html), a member asked how to create a signature in Adobe Acrobat Reader DC (the free Reader product, not the paid, full Acrobat produ…
When cloud platforms entered the scene, users and companies jumped on board to take advantage of the many benefits, like the ability to work and connect with company information from various locations. What many didn't foresee was the increased risk…

564 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question