title: How to fix download issues for some users using WebClient DownloadFileAsync?
body: <p>I created a Windows Form Application in C# that users of my game modification can use to download updates automatically. </p>
  
  <p>The 'Launcher', as I call it, uses WebClient to download the updates. But the first release of the mod is very big (2,7 GB zipped). The launcher works perfect for me and most users, but for some users the extraction of the zip file logs an error where the file is corrupted and not readable.</p>
  
  <p>I searched already on stack, and it is possible that the file might be corrupted or truncated due to bad internet connection. But how do I build in a method that fix that problem?</p>
  
  <pre class="lang-cs prettyprint-override"><code>//Start downloading file
  using (WebClient webClient = new WebClient())
  {
      webClient.DownloadFileCompleted += new 
      AsyncCompletedEventHandler(Client_DownloadFileCompleted);
      webClient.DownloadProgressChanged += new 
      DownloadProgressChangedEventHandler(Client_DownloadProgressChanged);
      webClient.DownloadFileAsync(new Uri("http://www.dagovaxgames.com/api/downloads/+ patch.path), downloadPath);
  }  
  
  private void Client_DownloadFileCompleted(object sender, AsyncCompletedEventArgs e)
  {
       //install the update
       InstallUpdate();
  }
  
  private void InstallUpdate()
  {
        var file = currentPatchPath;
        //get the size of the zip file
        fileInfo = new FileInfo(file);
        _fileSize = fileInfo.Length;
  
        installBackgroundWorker = new BackgroundWorker();
        installBackgroundWorker.DoWork += ExtractFile_DoWork;
  
        installBackgroundWorker.ProgressChanged += ExtractFile_ProgressChanged;
        installBackgroundWorker.RunWorkerCompleted += ExtractFile_RunWorkerCompleted;
        installBackgroundWorker.WorkerReportsProgress = true;
        installBackgroundWorker.RunWorkerAsync();
  }  
  </code></pre>
  
  <p>EDIT, just showing install code so that you know I am using a backgroundworker to extract the zip.</p>