title: Asynchronous multipart uploads to Amazon S3 with ASP.NET
body: <p>I am able to initiate asynchronous uploads to S3, however they are somehow not ending up as a file inside my S3 bucket and I see an error <em>'WithPartETags cannot be empty'</em>. Here is the complete code</p>
  
  <pre><code>InitiateMultipartUploadRequest initRequest =
      new InitiateMultipartUploadRequest()
      .WithBucketName(existingBucketName)
      .WithKey(Path.Combine(S3Path + "/", finfo.Name));
  
  InitiateMultipartUploadResponse initResponse =
      s3Client.InitiateMultipartUpload(initRequest);
  
  // 2. Upload Parts.
  long contentLength = finfo.Length;
  long partSize = 15728640;//52428800-50MB 104857600- 100 MB - 5242880 - 5 MB
  try
  {
      long filePosition = 0;
      for (int i = 1; filePosition &lt; contentLength; i++)
      {
  
          // Create request to upload a part.
          UploadPartRequest uploadRequest = new UploadPartRequest()
              .WithBucketName(existingBucketName)
              .WithKey(Path.Combine(S3Path + "/", finfo.Name))
              .WithUploadId(initResponse.UploadId)
              .WithPartNumber(i)
              .WithPartSize(partSize)
              .WithFilePosition(filePosition)
              .WithFilePath(finfo.FullName);
  
          // Upload part and add response to our list.
          //uploadResponses.Add(s3Client.UploadPart(uploadRequest));
  
          IAsyncResult ar = s3Client.BeginUploadPart(uploadRequest, null, null);
          ListObj.Add(new ThreadList() { _iasyncResult = ar });
  
          filePosition += partSize;
          Console.WriteLine("Length Written - " + filePosition + " .Content Length - " + contentLength);
      }
  
      bool uploadsComplete = false;
      while (!uploadsComplete)
      {
          bool individualuploadscomplete = true;
          foreach (var obj in ListObj)
          {
              if (!obj._iasyncResult.IsCompleted)
              {
                  individualuploadscomplete = false;
                  break;
              }
  
          }
          if (individualuploadscomplete)
          {
              uploadsComplete = true;
          }
      }
  
      foreach (var obj in ListObj)
      {
          s3Client.EndUploadPart(obj._iasyncResult);
      }
  
      //// Step 3: complete.
      CompleteMultipartUploadRequest compRequest =
          new CompleteMultipartUploadRequest()
          .WithBucketName(existingBucketName)
          .WithKey(Path.Combine(S3Path + "/", finfo.Name))
          .WithUploadId(initResponse.UploadId);
          //.WithPartETags(uploadResponses);
  
      CompleteMultipartUploadResponse completeUploadResponse =
          s3Client.CompleteMultipartUpload(compRequest);
  </code></pre>