Forum Moderators: open

Message Too Old, No Replies

Network Drive Access with ASP

         

scud924

7:10 pm on Jan 30, 2004 (gmt 0)

10+ Year Member



I need access to a file from my Webserver that is available on a mapped network drive (G:\).
I can't get to the file or even see that the G:\ exists and can't find any solutions.
Is this a User access rights issue?
If so, how do I setup IIS to allow internet users loading the asp to see the mapped network drive?
Any help would be greatly greatly appreciated.

Thanks,
Doug

bakedjake

12:51 am on Jan 31, 2004 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



Can't you do a "for each item in folder.Files" loop on the directory? That should work fine.

Windows doesn't care if it's D:\ or G:\, as long as it's mapped.

scud924

2:23 pm on Feb 2, 2004 (gmt 0)

10+ Year Member



No. For some reason (I'm assuming a user privelige issue), my ASP page won't recognize the mapped network drive. I tried looping through the drives and it finds the floppy, the harddrives but not the network drive even though it is mapped. Any ideas?

RossWal

6:24 pm on Feb 2, 2004 (gmt 0)

10+ Year Member



I don't get too much into this network permissions thing, but I believe it goes something like this. The process that reads the file will need to have permission to do so. That process will either be running as the network user accessing the page (if allow anonymous is disabled), or as the default user (IISUSER(?)) if allow anonymous is enabled. Meanwhile, the process that actually connects to the remote box (I'm assuming G: is on a remote box?) is something different. I think it's tied to the machine account of the web server. We went through this few months ago for pulling data off a file server to display on the web. It was the network guy who figured it all out, there were several white papers on msdn.

That's about all I can offer,
Good Luck

PS If you get it working, consider refering to it as //NetworkID/Share/whatever instead of G://whatever - it might mke you less reliant of the network drive mapping

plumsauce

1:04 am on Feb 3, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member




ok.

The user, ie. account accessing the network share
must have permissions to do so.

That means either, using authenticated access, or
equivalently, using anonymous access but running IIS
under an account created for the purpose.

In general, I consider this to be a truly bad idea
and do not permit it on servers under my control.
But, the technique is as explained above.