|
VERY new to asp...
I need to walk a folder that is on a company standard mapped drive "Z:" drive. I have tried to do this with UNC and the mapped drive name as follows:
' Create an instance of the FileSystemObject
Set MyFileObject=Server.CreateObject("Scripting.FileSystemObject")
' Create Folder Object
Set MyFolder=MyFileObject.GetFolder("\\machinename\pathname")
as well as this way:
' Create an instance of the FileSystemObject
Set MyFileObject=Server.CreateObject("Scripting.FileSystemObject")
' Create Folder Object
Set MyFolder=MyFileObject.GetFolder("z:\myfolderpath")
and even tried passing it as a variable defined each way:
' Create an instance of the FileSystemObject
Set MyFileObject=Server.CreateObject("Scripting.FileSystemObject")
' Create Folder Object
Set MyFolder=MyFileObject.GetFolder(sDocumentPath)
In evey case, I get an error message pointing to the line with the path information on it stating that the path is "not found."
Does ASP not support UNC paths or mapped drives?
|
|
|
I do not see any errors in your code, and yes, the FileSystemObject does allow both UNC and Drive Letter mapping. Your problem is probably a user privilege issue. You probably need to give the IUSR account privileges to the folder you want to work with.
By default the account used by IIS for anonymous access is IUSR_COMPUTERNAME. So if your computer is named "FRED", then the account would be IUSR_FRED. Right click the folder, select Security, and add the IUSR account.
|
|
|
|
|
Thanks Troy. I'll do as you said and see what happens. It is good to know that the support for UNC is there so at least there IS a solution. I'll wrestle the tiger till I win! ;-)
|
|
|
I am having the same problem, except I am not on a domain, but rather a workgroup (I only have 2 PC's)
I have tried everything, including adding the IUSR_machinename to my other machine. As well as installing IIS on it...still no dice.
|
|
|
Where you able to solve this issue. I'm having the same problem.
|
|
|
Unfortunately I have not, however I have been searching around for a solution.
Basically all I have been able to come up is the computers need to be in a domain, and the IUSR_machinename of the IIS server needs to be spoofed as a user on the networked machine.
I am not able to try this out, as I only have a 2 PC network, but I would be very interested if anyone else has been able to do this sucessfully.
|
|
|
I think the only way to get around this in your situation is called something like credential matching.
The theory goes something like:
Setup identical users on both machines that have exactly the same username and password.
In IIS directory security tab of your website manually set the Anonymous access account to this new user.
Grant the user of the same name on the other machine access to all the necessary folders.
I've haven't tried this myself but I've read something about it before.
Sorry I couldn't help more but hopefully this will give you some ideas.
|
|
|