Bookmarks

Yahoo Gmail Google Facebook Delicious Twitter Reddit Stumpleupon Myspace Digg

Search queries

dbf2mysql parameter, WWWXXXAPC, wwwxxxAPC, How to unsubscrube from dategen spam, docmd.close 2585, WWWXXXDOCO, nu vot, dhcpd lease file "binding state", WWWXXXDOCO, how to setup procmail to process html2text

Links

XODOX
Impressum

#1: Running DOS Commands with Unix UNC Paths within ASP

Posted on 2008-04-03 08:04:00 by Support

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
%>

Report this message