RE: Images and ASPNET permissions

Tech-Archive recommends: Speed Up your PC by fixing your registry

From: Patrick.O.Ige (PatrickOIge_at_discussions.microsoft.com)
Date: 12/02/04


Date: Wed, 1 Dec 2004 21:11:03 -0800

Impersonation should work for u
Try seeing through this site carefully at:-
http://www.developmentnow.com/blog/2004/12/impersonation-in-aspnet.html
Let me know if it works for you..
Enjoy!
Patrick

"Alex" wrote:

> I have a web application hosted on the server's F:\www directory. I have images stored on the file system at E:\Images. I have the website shared thru IIS pointing to the F:\www directory.
>
> 1.) Should I create a virtual directory to share out the images on E:\Images?
> 2.) Should I just link to my images on E:\Images from my webapp using a web.config defined setting of <add key="images" value="E:\Images"/> ?
>
> The problem is, when I do step 2, it works perfectly on my localhost dev environment. When I then push this site out to the webserver, and change my web.config's settings, the images are not appearing, even though the source to the images is correct - file///E:\Images\image1.jpg.
>
> If I do step 1, and share out the images as a vroot, the images appear, except now I cannot run edit/delete/move images using functions like Directory.GetFiles().
>
> I am having trouble with this. Option 1 fails me b/c I cannot edit/update/rename/move images. Option 2 fails me b/c the images will not appear in my website.
>
> What should I do for this scenario? Do I have permissions issues? I gave the ASPNET account admin rights, and I still cannot call Directory.GetFiles(). Any ideas?
>
> Thanks,
>
> Alex


Quantcast