Tell me what is better to use to upload files up to 100MB to an FTP server?

1 - Webclient

2 - FtpWebRequest

There are problems with 1: I have an archive on my server, but they turn out to be broken (you can't see it)

Here is the code:

public static void FTPReply() { try { using (WebClient FileFtp = new WebClient()) { FileFtp.BaseAddress = "ftp://site.ru";FileFtp.Credentials = new NetworkCredential("Login", "Password"); string[] fileNames = new string[] { }; foreach (string file in fileNames) { FileFtp.UploadFile(new Uri("ftp://site.ru/public_html/" + Path.GetFileName(file)), file); } } } catch { } } 

Tell me what is better to use to upload files?

  • How exactly are they broken? - Qwertiy
  • one
    Remove this filthy catch and understand. - Qwertiy

0