I used WebClient but it sometimes hangs when loading a file of 2 GB in size and writes that the file was successfully loaded.

What can I use to download a file of this size?

private void Download_Click(object sender, EventArgs e) { MessageBox.Show("ΠŸΠΎΠΆΠ°Π»ΡƒΠΉΡΡ‚Π° ΠΎΠΆΠΈΠ΄Π°ΠΉΡ‚Π΅ Π½Π°Ρ‡ΠΈΠ½Π°Π΅ΠΌ процСсс скачиваниС ΠΊΠ»ΠΈΠ΅Π½Ρ‚Π°", "тСст", MessageBoxButtons.OK, MessageBoxIcon.Information); WebClient client = new WebClient(); client.Proxy = null; client.DownloadProgressChanged += new DownloadProgressChangedEventHandler(client_DownloadProgressChanged); client.DownloadFileCompleted += new AsyncCompletedEventHandler(client_DownloadFileCompleted); client.DownloadFileAsync(new Uri("http://***/test.7z"), @ "test.7z"); } void client_DownloadProgressChanged(object sender, DownloadProgressChangedEventArgs e) { PicBoxPB.Value = e.ProgressPercentage; } void client_DownloadFileCompleted(object sender, AsyncCompletedEventArgs e) { MessageBox.Show("ΠšΠ»ΠΈΠ΅Π½Ρ‚ ΡƒΡΠΏΠ΅ΡˆΠ½ΠΎ скачался,ΠžΠΆΠΈΠ΄Π°ΠΉΡ‚Π΅ ΠΈΠ΄Π΅Ρ‚ процСсс распаковки.", "тСст", MessageBoxButtons.OK, MessageBoxIcon.Information); } 
  • Torrent was invented for downloading large files long ago, so I advise you to use it. - Alexis
  • What the torrent *** on c # - Sauron
  • Well, an example, try to download via the browser as many times as this file, most likely at some point there will be a download error. - Alexis
  • I have tried no mistakes - Sauron
  • one
    What is your target file system? - VladD

1 answer 1

I solved the problem using ftp web request , connect to ftp and download the file from there.