I’m trying to something pretty simple but am having headaches with it. I’m pretty sure all I have here is a permissions issue I don’t know how to solve but I could be wrong.
Here is my scenario…
I have 3 servers…
- Server A – Web Server (Windows 2003) – Anonymous Access Enabled
- Server B – Red 5 Media Server
- Server C – NAS
The website on Server A allows for recording/uploading of video to Server B where the video is processed/transcoded.
A Cron job on Server B then moves the videos over to Server C for storage.
Users can then watch their videos from Server A via a virtual directory thats been set up in IIS that points to Server C and connects as a domain user account.
I need to some how use the ASP File System Object to get the size of a folder on Server C that contains the videos.
I’ve mapped the parent folder of the folder on Server C where the videos are stored to a drive letter on Server A using a UNC path (\servername\videos).
I’ve tried using the FileSystemObject’s folderExists() method for debugging purposes and it returns false if I pass in the mapped letter drive or a UNC path. It gives a path not found error. Just to be sure I did a response.write of the path being passed into the folderExists() method and it is the correct path. All of this leads me to believe this is really a permissions issue which I just don’t know how to solve.
Thanks,
Ryan
Mapped network drives are no use to you in ASP on IIS6 since they are part of a user profile. User profiles are not fully loaded in services like IIS6.
Assuming a pure ASP environment (you can’t install other dlls etc) then you will need the anonymous user to have access to the network share where the videos are stored and use the UNC path.
Now typically the IUSR account is local guest account which has no access to the network. You will need to create a user on the domain that the NAS belongs to and specify that users credentials as the anonymous user account for those pages that need to do your “Get Size” task ( you don’t need change anonymous user for the whole application).
The foregoing assumes Server A is a member of the same domain as Server C. If not then you need to create user on the domain the Server A belongs to as well that mirrors the one on Server C including its password (or jump through trust relationship hoops).
With that in place you can go ahead and use
FileSystemObject.