io uso questo codice e non ho nessun problema:
Dim FtpRequest = CType(FtpWebRequest.Create("ftp://xxx.xxx.xxx.xxx"), FtpWebRequest)
FtpRequest.Credentials = New System.Net.NetworkCredential("pippo", "pippo")
FtpRequest.KeepAlive = False
FtpRequest.UseBinary = True
FtpRequest.Method = System.Net.WebRequestMethods.Ftp.DownloadFile
Using response As System.Net.FtpWebResponse = _
CType(FtpRequest.GetResponse, System.Net.FtpWebResponse)
Using responseStream As IO.Stream = response.GetResponseStream
'loop to read & write to file
Using fs As New IO.FileStream("C:\test,zip", IO.FileMode.Create)
Dim buffer(2047) As Byte
Dim read As Integer = 0
Do
read = responseStream.Read(buffer, 0, buffer.Length)
fs.Write(buffer, 0, read)
Loop Until read = 0
responseStream.Close()
fs.Flush()
fs.Close()
End Using
responseStream.Close()
End Using
response.Close()
End Using
noto (almeno) due differenze:
il buffer a 2047 anzichè a 2048
il controllo sul read=0 nel loop
Sull'ultimo punto vedi la nota in quest'articolo:
http://www.codeproject.com/KB/IP/FtpClient.aspx
fammi sapere ...
v