Running DOS Commands with Unix UNC Paths within ASP

Discussion in 'ASP General' started by Anonymous, Apr 3, 2008.

  1. Anonymous

    Anonymous Guest

    I just posted this in microsoft.public.inetserver.iis but thought this might
    be a better place for it.
    I have the following ASP page that simply executes a DIR command on a UNC
    path and displays the results. When the UNC path is a Windows machine the
    output is as expected however when the UNC path is a Unix machine running
    Samba, nothing is returned. I've configured the Authentication Method for the
    IIS web site to use an account that has permissions to both the Windows and
    Unix shares and confirmed this is the case by logging into the IIS server via
    RDP as this account and running the command from a DOS window, which works
    fine for both the Windows and Unix shares. The Samba server is configured to
    authenticate against the same domain as the IIS and File share servers.

    I don't believe there is a permissions problem and instead there is some
    wierd interaction between the CMD.EXE instance created by the ASP page and
    Unix server running Samba.

    <%
    Set objShell = CreateObject("WScript.Shell")
    Set objExec = objShell.Exec("cmd /c dir \\server\share")
    Set objStdOut = objExec.StdOut
    strOutput = objStdOut.ReadAll
    Response.Write strOutput
    %>
     
    Anonymous, Apr 3, 2008
    #1
    1. Advertisements

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. Tor Rest

    Copy using UNC paths

    Tor Rest, Aug 11, 2003, in forum: Perl
    Replies:
    1
    Views:
    3,903
    J├╝rgen Exner
    Aug 12, 2003
  2. Jerome
    Replies:
    3
    Views:
    15,046
    Juha Laiho
    Jan 24, 2005
  3. Ben Fairbank
    Replies:
    2
    Views:
    5,762
  4. Kory Wheatley

    Unix commands within Python code

    Kory Wheatley, Jul 15, 2004, in forum: Python
    Replies:
    3
    Views:
    12,132
    Jeremy Sanders
    Jul 16, 2004
  5. kapsi

    running dos commands using c

    kapsi, Jul 31, 2005, in forum: C Programming
    Replies:
    9
    Views:
    605
    Keith Thompson
    Aug 3, 2005
  6. Brad Pears

    running system commands from within ASP

    Brad Pears, Sep 9, 2004, in forum: ASP General
    Replies:
    1
    Views:
    191
    Brad Pears
    Sep 10, 2004
  7. Robert Wallace

    my own perl "dos->unix"/"unix->dos"

    Robert Wallace, Jan 21, 2004, in forum: Perl Misc
    Replies:
    7
    Views:
    592
    Michele Dondi
    Jan 22, 2004
  8. Replies:
    2
    Views:
    1,342
Loading...