FileSystemObject = not across servers???

Results 1 to 3 of 3

Thread: FileSystemObject = not across servers???

  1. #1
    John Schmitt Guest

    Default FileSystemObject = not across servers???

    I&#039ve used the FileSystemObject to move/copy files on my own hard drive, but what I really need to do is to copy them to another file server. However, this just ain&#039t working! Does the FileSystemObject support moving across files servers?<BR><BR>Here&#039s sample code: (w/ notes on what works & what doesn&#039t)<BR> Dim fso, f1,f2, s<BR> Set fso = CreateObject("Scripting.FileSystemObject")<BR>&#03 9 this next line works:<BR> Set f1 = fso.GetFile("c:foo.txt")<BR>&#039 this next line fails: even though the file IS THERE<BR> Set f2 = fso.GetFile("\server2sharear.txt")<BR>&#039 this next line also fails: even though drive U: is mapped<BR> Set f2 = fso.GetFile("U:ar.txt")<BR><BR>&#039 and this drive listing routine DOES tell me that U: is allowed<BR> Dim d, dc, n,sd<BR> Set dc = fso.Drives<BR> For Each d in dc<BR> sd = sd & d.DriveLetter & " - " <BR> sd = sd & n & "<BR>"<BR> Next<BR><BR>&#039BTW I even have admin priv&#039s on both servers involved.<BR><BR>Any ASP hack out there know how to copy files across servers? Both servers also run SQL7, but that&#039s probably a much more complex way to do it.<BR><BR>Thanks kindly,<BR>John<BR>

  2. #2
    Hema S Guest

    Default RE: FileSystemObject = not across servers???

    Your doubts are right John. As far as i know,you cannot use the &#039File SystemObject&#039 across servers as this amounts to &#039talking&#039 between 2 servers which for obvious security reasons is not allowed. You may have to write an object to do this or others out there may have better solutions. <BR>Hema

  3. #3
    Join Date
    Dec 1969

    Default RE: FileSystemObject = not across servers???

    I just went through this with my site. After many headaches I found the solution. This will probably help many people. Here goes...<BR><BR>First, the server running the asp page needs a mapped drive to the other server. The share on the second server can be hidden by putting a $ at the end of the share name. This will help a little bit for security.<BR><BR>Second, the user that the IIS service is running under usually IUSR_ServerName needs to have RW access to that share. <BR><BR>Third, this is the kicker. The IUSR_ServerName account needs log on locally rights to the second server and if the file system is NTFS needs rights to those directories. Also, that computer needs to have the IUSR account set up locally on it using the user manager on that computer not the user manager for domains. <BR><BR>To do all this I set up a dummy account with a known password. The web server running the ASP page needs to run under this account. Then I duplicated the account to all the other servers that the page needs to access.<BR><BR>For some documentation go here: <BR><BR><BR><BR><BR>Hope this helps.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts