FTPReply.ReplyData seems to not return the first row of data returned:
200- Port = "21"
200- Start time = "10/03/2010 02:10:02 AM"
200- Download = "0.000 KB"
200- Upload = "0.000 KB"
200- Online Users = "0"
200-======================================
I'm expecting:
Response: 200- Server IP = "192.168.1.6"
Response: 200- Port = "21"
Response: 200- Start time = "10/03/2010 02:10:02 AM"
Response: 200- Download = "0.000 KB"
Response: 200- Upload = "0.000 KB"
Response: 200- Online Users = "0"
Response: 200-======================================
FTPReply.ReplyText works fine, returning a string of all expected concatenated rows.
The code I'm using:
Try
' Set server and log-in properties
FtpConnection1.ServerAddress = "192.168.1.1"
FtpConnection1.ServerPort = "21"
FtpConnection1.UserName = "username"
FtpConnection1.Password = "password"
' Connect, get files and close
FtpConnection1.Connect()
Dim FTPReply As EnterpriseDT.Net.Ftp.FTPReply = FtpConnection1.InvokeSiteCommand("SHOW SERVER 192.168.1.1.21")
For Each Line As String In FTPReply.ReplyData
Console.WriteLine(Line)
Next Line
FtpConnection1.Close()
Catch ex As Exception
If FtpConnection1.IsConnected Then
FtpConnection1.Close()
End If
MessageBox.Show(Me, ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error)
End Try