External Server pull files from Internal Server

Discussion in 'ASP General' started by Daniel Di Vita, Aug 29, 2006.

  1. I have an application that needs to pull files from an internal server. This
    is the setup. The web server is external facing, meaning exposed to the
    internet. I then have a file server that sits inside our domain. I created a
    COM object that can impersonate a user to retrieve files from that server.
    However, I cannot get the application to pull files from the internal server.
    I first tried a domain account that could reach both servers. This did not
    work. I then had the network team create the same account on both machines.
    This is not working either. I can impersonate the user (I am able to get the
    user/users authenticated), but the script keeps coming back with and access
    denied.

    The application creates a wscript.shell object to zip files from the
    internal server and place the actual zip on the external server. Here is an
    example of the code:

    <%

    Set wShell = Server.CreateObject("WSCRIPT.SHELL")
    strZip = "c:\progra~1\winzip\wzzip.exe -ee -ybc E:\\5200044298_1_mqh6Kw.zip
    \\InternalServer\SharedDrive\1125010"

    Set objLogon = Server.CreateObject("LoginAdmin.ImpersonateUser")
    objLogon.Logon "localuseraccount", "password", "",2,0
    Response.write objLogon.getToken & "<br>"
    Response.Write objLogon.getResult & "<br>"

    set proc = wShell.exec(strZip)

    Response.Write "Return String = " & proc.StdOut.ReadAll & "<br>"
    set wShell = nothing
    objLogon.LogOff
    Set objLogon = nothing
    %>

    The com object basically takes a username,password,domain(if blank defaults
    to local box),Logon Type, and Logon Provider. I have tried several
    combinations of long on type and provider, but nothing seems to work. I am
    thinking that I am really only authentication to the local machine and not to
    the internal server. Our network people say they have everything between
    servers is setup correctly, but I am not sure. I can, using the
    FileSystemObject, copy the files from the internal server to the Web Server,
    but it is when I try to use the script shell that this does not work. Any
    ideas are appreciated.

    Daniel C. Di Vita
    Daniel Di Vita, Aug 29, 2006
    #1
    1. Advertising

  2. Daniel Di Vita

    Jeff Cochran Guest

    On Tue, 29 Aug 2006 07:01:02 -0700, Daniel Di Vita
    <> wrote:

    >I have an application that needs to pull files from an internal server. This
    >is the setup. The web server is external facing, meaning exposed to the
    >internet. I then have a file server that sits inside our domain. I created a
    >COM object that can impersonate a user to retrieve files from that server.
    >However, I cannot get the application to pull files from the internal server.
    >I first tried a domain account that could reach both servers. This did not
    >work. I then had the network team create the same account on both machines.
    >This is not working either. I can impersonate the user (I am able to get the
    >user/users authenticated), but the script keeps coming back with and access
    >denied.
    >
    >The application creates a wscript.shell object to zip files from the
    >internal server and place the actual zip on the external server. Here is an
    >example of the code:
    >
    ><%
    >
    >Set wShell = Server.CreateObject("WSCRIPT.SHELL")
    >strZip = "c:\progra~1\winzip\wzzip.exe -ee -ybc E:\\5200044298_1_mqh6Kw.zip
    >\\InternalServer\SharedDrive\1125010"
    >
    >Set objLogon = Server.CreateObject("LoginAdmin.ImpersonateUser")
    >objLogon.Logon "localuseraccount", "password", "",2,0
    >Response.write objLogon.getToken & "<br>"
    >Response.Write objLogon.getResult & "<br>"
    >
    >set proc = wShell.exec(strZip)
    >
    > Response.Write "Return String = " & proc.StdOut.ReadAll & "<br>"
    >set wShell = nothing
    >objLogon.LogOff
    >Set objLogon = nothing
    >%>
    >
    >The com object basically takes a username,password,domain(if blank defaults
    >to local box),Logon Type, and Logon Provider. I have tried several
    >combinations of long on type and provider, but nothing seems to work. I am
    >thinking that I am really only authentication to the local machine and not to
    >the internal server. Our network people say they have everything between
    >servers is setup correctly, but I am not sure. I can, using the
    >FileSystemObject, copy the files from the internal server to the Web Server,
    >but it is when I try to use the script shell that this does not work. Any
    >ideas are appreciated.


    What account is the script running under? Does that acount have
    permissions?

    Jeff
    Jeff Cochran, Aug 30, 2006
    #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. Replies:
    2
    Views:
    2,146
    Mike Treseler
    Jun 28, 2006
  2. Hans-Joachim Widmaier

    Reading external files or internal data

    Hans-Joachim Widmaier, Aug 11, 2003, in forum: Python
    Replies:
    0
    Views:
    294
    Hans-Joachim Widmaier
    Aug 11, 2003
  3. kbutterly
    Replies:
    0
    Views:
    325
    kbutterly
    Oct 4, 2006
  4. ferrari
    Replies:
    0
    Views:
    661
    ferrari
    Jun 29, 2008
  5. Mellow Crow
    Replies:
    6
    Views:
    412
    Richard Cornford
    Nov 4, 2005
Loading...

Share This Page