Posted on: 1/23/2015 8:43:21 PM | Views : 589

I am trying to download a file from ftpserver using vb.net. I have below code
Dim ftpRequest As FtpWebRequest = DirectCast(WebRequest.Create(New Uri("ftp://xxxx/images/Sign/test.txt")), FtpWebRequest) ftpRequest.Method = WebRequestMethods.Ftp.DownloadFile ftpRequest.EnableSsl = True ftpRequest.Credentials = New NetworkCredential("xxx", "yyy") ftpRequest.UsePassive = True ftpRequest.Proxy = Nothing Dim response As FtpWebResponse = DirectCast(ftpRequest.GetResponse(), FtpWebResponse)//error Using fs As FileStream = File.OpenWrite("fileName.txt") response.GetResponseStream.CopyTo(fs) End Using
when it executes the //error line it says The remote server returned an error: (550) File unavailable. I have spent 4 hours googling on this . but still struggling to correct this issue. please help

Go to the complete details ...