i am not sure what i am doing wrong. any help would be appreciated. maybe SSL is not configured properly on my server?
error:
The remote server returned an error: (500) Syntax error, command unrecognized.
Code:Me.ListBoxFTPFiles.Items.Clear() Dim fwr As System.Net.FtpWebRequest = System.Net.FtpWebRequest.Create("ftp://ftp.site.com") fwr.UsePassive = False fwr.UseBinary = True fwr.EnableSsl = True fwr.Credentials = New System.Net.NetworkCredential("username", "password") fwr.Method = System.Net.WebRequestMethods.Ftp.ListDirectory Dim sr As New System.IO.StreamReader(fwr.GetResponse().GetResponseStream()) 'this is the error Dim str As String = sr.ReadLine() While Not str Is Nothing Me.ListBoxFTPFiles.Items.Add(str) str = sr.ReadLine() End While sr.Close() sr = Nothing fwr = Nothing


Reply With Quote