The following code is intended to retrieve a file via FTP. However, I'm getting an error with it.
serverPath = "ftp://x.x.x.x/tmp/myfile.txt";
FtpWebRequest request = (FtpWebRequest)WebRequest.Create(serverPath);
request.KeepAlive =…
This is slightly tricky.
I am uploading files to FTP asynchronously.
After uploading each file I am checking the status of the upload operation for that file. This can be done with StatusCode property of the FtpWebResponse object for that…
I'm writing a program that uses an ftp server with credentials. I'm trying to retrieve the directory list from the server but when I get to the line:
string line = reader.ReadLine();
the string that I get contains only : "Can't open…
I have an application that does the following: directory listing, download file, download all.
I have an issue with getting the file names from WebRequestMethods.Ftp.ListDirectoryDetails. It seems that it is not possible to do so for every…
I want to download files based on their date time from a ftp server..I can access this Ftp from CuteFtp third party and every thing is Okey..but when I run the code below at line GetRespone() I get this error: the operation has timed out.
I…
First time poster, long-time reader. I have a really annoying problem thats been getting on my nerves. Ive got a program set up so I listen for new files on an FTP server, if theres a new file I download it. From there I work on some of the…
I am trying to login to a ftp server. Using the following code in C#.
FtpWebRequest request = (FtpWebRequest)WebRequest.Create("ftp://ftp-server");
request.Method = WebRequestMethods.Ftp.ListDirectoryDetails;
// This example assumes the FTP site…
We need to get about 100 very small files from a remote FTP server using vb.net.
Our company won't let us buy (or install) any 3rd party ftp libraries... so we are forced to use something like FtpWebRequest. (Or is there a better free, choice that…
I am building an FTP utility class in C#. In the case that a WebException is thrown on a call to FtpWebRequest.GetResponse(), in my case the exception is thrown for the requested file not existing on the remote server the FtpWebResponse variable is…
I’m using the following code to download a file from a remote ftp server:
FtpWebRequest request = (FtpWebRequest)WebRequest.Create(serverPath);
request.KeepAlive = true;
request.UsePassive = true;
request.UseBinary =…
I'm using the following code in my program, would I still need to call response.close()? Or does the FtpWebResponse IDisposable implementation close the response?
using (FtpWebResponse response = (FtpWebResponse)request.GetResponse())
{
}
So…
I have created a console application which reads a CSV file from FTP server and dump the records after validation to database.
When I tried the code from my local machine, its working perfectly. No errors, no bugs. But when I put it on a Azure…
I'm using FtpWebRequest and a Transient Fault Handling application block. For my fault handler, I have an error detection strategy that checks if the response is considered transient so that it knows whether or not to retry:
public bool…