CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 9 of 9
  1. #1
    Join Date
    Jun 2001
    Location
    MI, USA
    Posts
    4

    FileSystemObject in ASP

    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

  2. #2
    Join Date
    Jan 2000
    Location
    MO, USA
    Posts
    1,506

    Re: FileSystemObject in ASP

    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
    John Pirkey
    MCSD (VB6)
    http://www.stlvbug.org

  3. #3
    Join Date
    Jun 2001
    Location
    MI, USA
    Posts
    4

    Re: FileSystemObject in ASP

    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

  4. #4
    Join Date
    Jan 2000
    Location
    MO, USA
    Posts
    1,506

    Re: FileSystemObject in ASP

    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
    John Pirkey
    MCSD (VB6)
    http://www.stlvbug.org

  5. #5
    Join Date
    Jun 2001
    Location
    MI, USA
    Posts
    4

    Re: FileSystemObject in ASP

    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

  6. #6
    Join Date
    Jan 2000
    Location
    MO, USA
    Posts
    1,506

    Re: FileSystemObject in ASP

    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
    John Pirkey
    MCSD (VB6)
    http://www.stlvbug.org

  7. #7
    Join Date
    Jun 2001
    Location
    MI, USA
    Posts
    4

    Re: FileSystemObject in ASP

    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

  8. #8
    Join Date
    Apr 2001
    Location
    CA
    Posts
    153

    Re: FileSystemObject in ASP

    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.../Q274/0/38.ASP
    and it helped fix my problem.

    thanx/good luck,
    adam
    thanx/good luck

  9. #9
    Join Date
    Jul 2001
    Posts
    14

    Re: FileSystemObject in ASP

    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...LNG=ENG&SA=PER




Posting Permissions

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





Click Here to Expand Forum to Full Width

Featured