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

    Copy using UNC paths

    Tor Rest, Aug 11, 2003, in forum: Perl
    Replies:
    1
    Views:
    3,731
    J├╝rgen Exner
    Aug 12, 2003
  2. Ben Fairbank
    Replies:
    2
    Views:
    5,403
  3. kapsi

    running dos commands using c

    kapsi, Jul 31, 2005, in forum: C Programming
    Replies:
    9
    Views:
    463
    Keith Thompson
    Aug 3, 2005
  4. Robert Wallace

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

    Robert Wallace, Jan 21, 2004, in forum: Perl Misc
    Replies:
    7
    Views:
    267
    Michele Dondi
    Jan 22, 2004
  5. Replies:
    2
    Views:
    1,086
Loading...

Share This Page