Tengo un servidor ftp, mi problema es el siguiente cuando intento descargar archivos del servidor con el siguiente codigo:
Código vb:
Ver originalPrivate Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
On Error GoTo err
GoTo cont
err:
MsgBox(Err.Description, MsgBoxStyle.Exclamation Or MsgBoxStyle.OkOnly, "Error #" & Err.Number)
My.Computer.Clipboard.SetText(Err.Description)
If File.Exists("C:\file.exe") Then
Kill("C:\file.exe")
End If
Exit Sub
cont:
With My.Computer.Network
If .Ping("ftp://host.net") Then
MsgBox("Conexión establecida.", MsgBoxStyle.OkOnly Or MsgBoxStyle.Information, "ftp://host.net")
End If
.DownloadFile("ftp://host.net/file.exe", "C:\file.exe", "user", "password", True, 500, True)
End With
End Sub
Entonces hace como si fuera a descargar y cuando comienza da estos 2 errores aveces uno y aveces otro:
No es posible conectar con el servidor remoto Se ha terminado la conexión: El servidor ha cometido una infracción de protocolo.
Que prodrá ser, gracias por su ayuda.