Re: ftp on IIS 6.0 w2k3

From: Alun Jones [MSFT] (alunj_at_online.microsoft.com)
Date: 01/28/05


Date: Fri, 28 Jan 2005 15:27:37 -0800

The first thing to do is to find out what part of this is failing, where,
and why.

Are you checking (and logging) error results from your attempt to call out
to the batch file?

Try a batch file that writes a simple message out to a log file, so that you
can see whether the batch file gets run in the first place.

What is the working directory for the batch file? Don't forget that, just
as you can't "CD" to a UNC, you can't run CMD from a UNC (try it with a
shortcut, and you'll find that it drops you in your Windows directory
instead).

Can the account that you use even access the UNC? Local System is not given
rights to remote shares, by default, and it would be a bad thing,
security-wise, to allow null session shares so that it can.

Go through the usual stages of linear problem solving to find out where the
problem is, and what the problem is, and it'll be easier to solve. Right
now, all you've got is a complex system that is failing somewhere between
start and finish. Simplify the system until it no longer fails, and you
will have narrowed down the failure. Then add back complexity until it
fails again, and you've got the failure bracketed. Zero in on it until you
know exactly where and what the problem is.

Alun.
~~~~

-- 
Software Design Engineer, Internet Information Server (FTP)
This posting is provided "AS IS" with no warranties, and confers no rights.
"Moheb" <Moheb@discussions.microsoft.com> wrote in message 
news:FF4B7BFC-0F92-46F6-9A00-A27197D77C01@microsoft.com...
> Hi
>
> w2k3 server once again is driving me nuts.
>
> I have an asp.net app where I am ftpying a file to an ftp server using
> something like:
>
> ftp -s:ftp.txt host.
>
> where ftp.txt contains user name, pwd and an ftp command such as:
>
> send fn.txt 'fn1.txt'
>
> where fn.txt and fn1.txt are source and destination files respectively. 
> The
> command runs from a dos shell. I am using a process class in
> System.Diagnostics to do it in an .aspx file. That also works perfect on 
> my
> dev. machine. The only thing is that I am using shares for all the file
> names. For example like:
>
> \\mydevmachine\mydir\myftp.bat for the command file name
>
> \\mydevmachine\mydir\ftp.txt for the ftp commands file
>
> \\mydevmachine\mydir\fn.txt for my file to be uploaded
>
> As soon as I move the app to w2k3 the command hangs up. Suspecting some
> security problem (usual in IIS 6.0) here are things I already tried:
>
> 1. Created an app pool and gave it Local System identity.
>
> 2. Changed username in the process model of the machine.config to system
>   instead of machine.
>
> 3. Allowed full access to all the files.
>
> 4. Tried with and without shares, various permissions, etc.
>
> And a bunch of other hacks to no avail. It is really frustrating when you
> develop something on your dev machine and can't get it to work on the prod
> machine and very little documentation to go by. Can anyone please help? 
> thx.
>
> 


Relevant Pages

  • Re: ftp script question
    ... but if I run as a batch job I get to the ftp ... >> command line waiting for command. ... >in the batch file do something like ...
    (microsoft.public.win2000.cmdprompt.admin)
  • Re: FTP in DTS
    ... > works great when I use it from command prompt. ... > problem is how to set it up in execute process task. ... > path of win32process in executeprocess task to batch file ... >>Do you have any sample code for command line ftp commands? ...
    (microsoft.public.sqlserver.dts)
  • Re: FTP in DTS
    ... I have wrote the batch file for commandline ftp and it ... works great when I use it from command prompt. ... problem is how to set it up in execute process task. ...
    (microsoft.public.sqlserver.dts)
  • Re: ftp usage in batch command?
    ... what are the advantages of ftp transfer ... > If you are talking about the proxy command then Microsoft ftp ... > servers don't support that. ... > shares are not allowed. ...
    (microsoft.public.win2000.cmdprompt.admin)
  • Re: ftp usage in batch command?
    ... what are the advantages of ftp transfer ... If you are talking about the proxy command then Microsoft ftp servers don't ... I don't think there is an advantage of ftp vs. shares, ...
    (microsoft.public.win2000.cmdprompt.admin)