How do I get a directory listing on remote server?

Discussion in 'ASP General' started by Dan King, Jan 4, 2005.

  1. Dan King

    Dan King Guest

    I have a few ASP pages that run great on a local machine. They read folder
    content then display the information in the browser.
    I would like to be able to read the same data from several remote servers.
    The problem is the remote servers are all in different domains with no
    trusts between them, so I cannot run the site as a domain user. I currently
    have a login page that gathers user names and passwords. Can I somehow use
    those to connect to a remote server? When I look in the Security logs on the
    remote server, I can see a login failure from the anonymous IIS user the web
    site runs as.

    My code currently fails at the third line here:
    Set objFSO = Server.CreateObject("Scripting.FileSystemObject")
    response.write strPath 'this is here to verify the PATH is actually correct
    Set objFolder = objFSO.GetFolder(strPath)

    Is it possible to do something like:
    Set objFolder = objFSO.GetFolder(strPath) ,{username},{password}
    so I can connect as the user that logs into the site?

    BTW, the users already authenticate to their respective domains, and the
    users would already have access to the remote shares.


    --
    __o
    _-\<,
    (_)/(_)____
     
    Dan King, Jan 4, 2005
    #1
    1. Advertising

  2. Dan King

    Jeff Cochran Guest

    On Mon, 3 Jan 2005 16:43:11 -0800, "Dan King"
    <> wrote:

    >I have a few ASP pages that run great on a local machine. They read folder
    >content then display the information in the browser.
    >I would like to be able to read the same data from several remote servers.
    >The problem is the remote servers are all in different domains with no
    >trusts between them, so I cannot run the site as a domain user. I currently
    >have a login page that gathers user names and passwords. Can I somehow use
    >those to connect to a remote server? When I look in the Security logs on the
    >remote server, I can see a login failure from the anonymous IIS user the web
    >site runs as.


    This is all Windows user accounts and permissions. You need to
    provide access for the user account that IIS is running as, either
    anonymous or the user if you are authenticating.

    >My code currently fails at the third line here:
    >Set objFSO = Server.CreateObject("Scripting.FileSystemObject")
    >response.write strPath 'this is here to verify the PATH is actually correct
    >Set objFolder = objFSO.GetFolder(strPath)
    >
    >Is it possible to do something like:
    >Set objFolder = objFSO.GetFolder(strPath) ,{username},{password}
    >so I can connect as the user that logs into the site?


    No. But you could use a share that pre-exists.

    >BTW, the users already authenticate to their respective domains, and the
    >users would already have access to the remote shares.


    If you're using Windows Authentication in IIS then this should allow
    access.

    Jeff
     
    Jeff Cochran, Jan 4, 2005
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. avkelkar

    Server side directory listing

    avkelkar, Jul 5, 2006, in forum: Java
    Replies:
    0
    Views:
    578
    avkelkar
    Jul 5, 2006
  2. yoda
    Replies:
    0
    Views:
    312
  3. gert
    Replies:
    1
    Views:
    858
  4. Carlos Diaz

    how to get a http directory listing

    Carlos Diaz, Jul 13, 2005, in forum: Ruby
    Replies:
    2
    Views:
    118
  5. Seth Brundle
    Replies:
    4
    Views:
    456
    A. Sinan Unur
    Sep 22, 2005
Loading...

Share This Page