Click to See Complete Forum and Search --> : FileSystemObject in ASP


adamD
June 1st, 2001, 10:16 AM
hi...

does anyone know if it is possible; when using FSO to move, creat,copy files or
folders between two different servers.???..when I try to use it on the same server
where I am running my program, it works fine but it doesn't work if I try it
between two seperate servers....I get this error "Server.CreateObject Failed".



regards,,
Adam
.



Adam. D

Johnny101
June 1st, 2001, 12:24 PM
the FSO should be able to see all the network computers as well. so if you use UNC naming it should work.


set FSO = Server.CreateObject("Scripting.FileSystemObject")

set oFolder = FSO.GetFolder("\\ComputerName\ShareName\SubDir")

...




is that what you're talking about?

john

John Pirkey
MCSD
http://www.ShallowWaterSystems.com
http://www.stlvbug.org

adamD
June 1st, 2001, 12:37 PM
john,,

Thanks for the reply...I tried that before and it didn't work....it doesn't like it when I put the computername in the UNC path. I get this error: "Server object error 'ASP 0177 : 800a004c'

Server.CreateObject Failed"

I did exaclty like you're saying...anyother ideas? or is there an alternative other than using FSO...

thanks
Adam

Regards,
Adam. D

Johnny101
June 1st, 2001, 03:12 PM
then it's probably a permissions thing - the IUSR_<machine name> NT User probably doesn't have permissions to that share. Talk to the network admin and see if he can set some permissions up and give it a try again.

hope this helps,

john

John Pirkey
MCSD
http://www.ShallowWaterSystems.com
http://www.stlvbug.org

adamD
June 1st, 2001, 03:29 PM
no John it's not..I already discuss it with my network admin....you think maybe FSO doesn't work between diff servers??

Regards,
Adam. D

Johnny101
June 1st, 2001, 04:00 PM
well, i'm not sure what else it could be. i can create folders/files on other network shares with the FSO.

what is the exact code you're using?



John Pirkey
MCSD
http://www.ShallowWaterSystems.com
http://www.stlvbug.org

adamD
June 4th, 2001, 11:33 AM
Hi John...

here is the code I am using::

SetMyFolder=MyFileObject.GetFolder("\\MachineName\OldWfileFiles\94\APR")
for each Thing IN MyFolder.Files
Response.write Thing
next


Regards,
Adam. D

forty7
June 4th, 2001, 12:41 PM
Something I ran into that is down the road of permissions is that the TypeLib folder in the registry was not allowing the anonymous user to read certain object class ids and therefore not create them. I went here:
http://support.microsoft.com/support/kb/articles/Q274/0/38.ASP
and it helped fix my problem.

thanx/good luck,
adam

renimol
July 19th, 2001, 04:52 AM
Hi Adam,
I also encountered the same problem u had.I came to read your problem while searching a solution for the same problem.From the replies I got ,i got a link to the microsoft kb article which says file systemobject has some problems while using between two different servers.Though it didn't make any improvement to my situation i think that can be a useful info to u.Just read it and try out.And let me know if it worked for u.And pls send any suggestions u have.

http://support.microsoft.com/support/kb/articles/q197/9/64.asp?LNG=ENG&SA=PER