I have a VB.NET application that does an FTP and redirects the Standard Output to a file. All is well when run from a Windows XP box, but when run from a 2003 server, I only get partial data from the StandardOutput. The missing contents are the actual FTP replies (like "150 Open...." and "226 Transfer....."). When run from the command line on the 2003 box, the desired responses appear.
I've scoured this site and the internet, and have seen several others ask this same question but have not come across any answers.
Here's a code snippet:
Dim FixedLiteral As String = FileParam4
Dim DOS As New Process
Dim pinfo As New ProcessStartInfo("ftp.exe
pinfo.Arguments = "-n -d -s:"
pinfo.Arguments += FixedLiteral
ut = True ' set to "true" to enable logging
r = False
pinfo.UseShellExecute = False ' set to true to make silent/background
' Execute the process
DOS = Process.Start(pinfo)
If DOS.Start() Then
' Create the file for storing the output of the process
Dim outfile As New System.IO.StreamWriter(Fil
' Make sure the process has completed
' Dump all the output from the process into the file
adToEnd) 'original line and location
'After the FTP process is done, I must open up the log file and check for the string "226 File received ok". If I don't find it, then I will have to try the FTP again.
mySRftp = New StreamReader(FileParam5)
mySRText = mySRftp.ReadToEnd()
If InStr(mySRText, "226 Transfer completed") > 0 Then
'Remove the concatenated ftp'ed file.
BadAttemptCnt += 1
If BadAttemptCnt < 4 Then