Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Problem with retrieveing images above /wwwroot

Status
Not open for further replies.

cfsponge

Programmer
Feb 22, 2006
44
US
I'm developing a project on a Windows 2003 Server, and it seems a known issue exists with enable write permissions on folders, so I had to create a folder above to store images from the browser (C:\Inetpub\blah\)

I created a virtual directory in IIS to point to this folder, hoping to use it as a shortcut in my code to output all images here, but isn't proving to be the case.

<!--#include virtual="/blah/gallery.asp"--> points to the above physical path. The only problem is I can't use IMG tags to retrieve the value since it references the calling template's relative location within the localhost structure.

I was thinking of doing a binary write for each, but that's just murder. Short of storing the images in a database, is there a way to use the virtual include like this?
 
I'm not sure of the known issue with Win2003 Server as I have not had this problem but won't Server.MapPath of the image give you the path and show it correctly?


General FAQ faq333-2924
5 steps to asking a question faq333-3811
 
I don't understand. If your images are in a irtual directory called "blah", then you should be able to output image tags using that vritual directory:
Code:
<img src="/blah/myImage.gif" alt="my Cool Pic" />

Does this not work?

barcode_1.gif
 
Also
known issue exists with enable write permissions on folders
I failed to ask what you are actually writing to the folder if you are having problems viewing images



General FAQ faq333-2924
5 steps to asking a question faq333-3811
 
onpnt, the issue with Win2003 is that you cannot disable the "Read Only" checkbox on folders so you can write/upload data to them. In IIS I did everything I could, even following MSDN's process, to no avail. So, I have an app that allows a user to upload images to the server, but had to make a writable folder outside of the folder so it would work, hence directly under Inetpub/. No matter what you try administrative wise, the read-only checkbox retuns.
 
Tarwn, thank you so much! I couldn't put my finger on it, but your example worked. I knew a virtual directory would solve it, and yet I couldn't remember exactly how.
 
One of the big differences between 2000 and 2003 Server is the latter installs with much tighter default security.
 
I should have been a bit more clear and gone further in that. Apologies! By default the read only is checked in win 2003 (and XP). It’s the default value given to everyone. You must also set the security up correctly on the folders and child directories under permissions though. Once you do that for the given accounts it should work.

I know exactly what you are saying though. I went through the same thing on countless shares I have here when we moved to win2003. It's not an issue really. They call it an enhancement ;)



General FAQ faq333-2924
5 steps to asking a question faq333-3811
 
Then, onpnt, if you have an actual way to fixing them I'm all ears. I've tried giving the same permissions to the all folders under and to no avail.

But, it's not DEFCON-5 since my virtual path works now.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top