Problem using FileSystemObject and UNC paths
Author Message
Problem using FileSystemObject and UNC paths

I am trying to use JScript and the FileSystemObject to iterate through
folders on my network.  The problem is that functions like GetFolder fail
when I give them a UNC path.  The same code succeeds if I replace the UNC
path with actual local on the server (assuming the UNC path referred to a
drive actually on the server).

For example:

There is a file on my server at d:\public\readme.txt.
d:\public is shared on the network as \\comp1\public.

Ideas?

Mon, 11 Feb 2002 03:00:00 GMT
Problem using FileSystemObject and UNC paths

Quote:
> I am trying to use JScript and the FileSystemObject to iterate through
> folders on my network.  The problem is that functions like GetFolder fail
> when I give them a UNC path.  The same code succeeds if I replace the UNC
> path with actual local on the server (assuming the UNC path referred to a
> drive actually on the server).

Hi Aaron,

Does the IUSR_MACHINE account have access to the share? It needs an account
on the computer, I think.

http://www.deja.com/ will give you references to answers to this (it comes
up periodically, but I can't remember the exact answer).

Peter

--
Peter J. Torr - Microsoft Windows Script Program Manager

Please do not e-mail me with questions - post them to this

Mon, 11 Feb 2002 03:00:00 GMT
Problem using FileSystemObject and UNC paths
To expand on what Peter said...

If IUSR_machinename doesn't have access, then you'll need to use Basic
Authentication so IIS will have credentials with which to respond to the NT
challenge.

--
Michael Harris

| > I am trying to use JScript and the FileSystemObject to iterate through
| > folders on my network.  The problem is that functions like GetFolder fail
| > when I give them a UNC path.  The same code succeeds if I replace the UNC
| > path with actual local on the server (assuming the UNC path referred to a
| > drive actually on the server).
|
| Hi Aaron,
|
| Does the IUSR_MACHINE account have access to the share? It needs an account
| on the computer, I think.
|
| http://www.deja.com/ will give you references to answers to this (it comes
| up periodically, but I can't remember the exact answer).
|
| Peter
|
| --
| Peter J. Torr - Microsoft Windows Script Program Manager

| Please do not e-mail me with questions - post them to this