473,385 Members | 1,752 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Images and ASPNET permissions

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
Nov 18 '05 #1
2 1890
Impersonation should work for u
Try seeing through this site carefully at:-
http://www.developmentnow.com/blog/2...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

Nov 18 '05 #2
Hello Alex,

The reason why option 2 doesnt work on the web server is because it will
be pushing out image hrefs such as file://e:/images/image1.jpg. Of course,
the client doesnt have this e: drive. :)

Make sure the ASPNET account actually has permissions to e:\images.

On a side note, why wouldnt you have images that the web application requires
underneath the web applications vroot? At that point, you should be able
to do anything you want.

--
Matt Berther
http://www.mattberther.com
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

Nov 18 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Michael J. Bigos | last post by:
Has anyone else come across this? We are building an ASP.Net application that uses a certficate in the local machine store to sign XML data before transmitting it to a third-party. The third...
0
by: hagaiy | last post by:
Has anyone else come across this? We are building an ASP.Net application that uses a certificate and private key in the local machine store. (we are testing it both on windows 2000 & 2003) We...
7
by: M. Simioni | last post by:
Hi, i'm always auditing ASPNET's account accesses on my webserver, a WIN2K_SP4 + IIS5 + SQLServer2K_SP3a machine. Nearly all the applications work correctly, but i constantly find a message in...
4
by: palakwai_919 | last post by:
We have a Windows 2000 server with Beta 2 of the 2.0 Framework installed and the 1.1 Framework. For some odd reason when we hit our 2.0 Framework application we get the following error: Server...
3
by: Arun | last post by:
Hi, I have simple question to ask. How to write multiple Binary files to the Browser using Asp.Net and Visual C#.net I have seen examples where single binary file is written to browser. ...
6
by: Andrew Chalk | last post by:
My application attempts to connect to an SQL Server database as name ASPNET and Login Name SERVERNAME/ASPNET in response to these commands: SqlConnection myConnection = new SqlConnection("Data...
5
by: Peter Lapic | last post by:
I have to create a image web service that when it receives an imageid parameter it will return a gif image from a file that has been stored on the server. The client will be an asp.net web page...
5
by: Paul Aspinall | last post by:
Hi I am trying to print, server side, from my web application. I'm getting problems, as my ASPNET account is a local account, and is not trusted on the domain to print to printers (ie. does not...
12
by: Jon B | last post by:
Hi There! For some reasons, some images of my ASP.NET website are cannot be displayed in the browser (even tho they exists on the server). They are just normal JPG and PNG images and the website...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.