I am trying to redirect output from an FTP conversation using
System.Diagnostics.Process.
When I running the following code on XP Professional, I get the
redirected output from my applications post to the FTP server and the
FTP server's responses.
When I migrate the application to Windows 2000 server the application
works, but I only see my posted conversation, I don't get any of the
redirected responses from the FTP server.
Why the difference? Can it be fixed.
Example of code used below:
System.Diagnostics.Process proc = new System.Diagnostics.Process();
proc.EnableRaisingEvents=false;
proc.StartInfo.WorkingDirectory = WorkDir;
proc.StartInfo.UseShellExecute=true;
proc.StartInfo.FileName="ftp";
proc.StartInfo.RedirectStandardOutput = true;
proc.StartInfo.Arguments = cmdline;
proc.Start();
String output = String.Format("\n{0}",
proc.StandardOutput.ReadToEnd());