title: .Net YouTube API 2.0 - Consistent Errors Uploading - "The request was canceled"
body: <p>This is the error I get:</p>
  
  <pre><code>An unhandled exception of type 'System.Net.WebException' occurred in Google.GData.Client.dll
  
  Additional information: The request was aborted: The request was canceled.
  </code></pre>
  
  <p>I trimmed my code down to a basic version of what I'm using:</p>
  
  <pre><code>        YouTubeRequestSettings settings;
          YouTubeRequest request;
          string devkey = "AI39si7VBlJSkNcHUWZdk5OPYa8IXZhVo-ak7KRtFYlfkCdt767P6oxPgoWcMXMfUCLL6-Ot3G-NmLe_cIlCWQDRq2FQl3F0aQ";
          string username = Username.Text;
          string password = Password.Text;
          Upload.Text = "Authenticating...";
          settings = new YouTubeRequestSettings("Music to YouTube", devkey, username, password) { Timeout = -1 };
          request = new YouTubeRequest(settings);
  
          Video newVideo = new Video();
  
          newVideo.Title = Title.Text;
          newVideo.Description = Description.Text;
          newVideo.Keywords = Keywords.Text;
          newVideo.Tags.Add(new MediaCategory("Music", YouTubeNameTable.CategorySchema));
  
          if (Privacy.Text == "Public")
              newVideo.YouTubeEntry.Private = false;
          else if (Privacy.Text == "Unlisted")
              newVideo.YouTubeEntry.AccessControls.Add(new YtAccessControl("list", "denied"));
          else if (Privacy.Text == "Private")
              newVideo.YouTubeEntry.Private = true;
  
          string fileMusic = "audio";
          string fileImage = "image";
          string fileTimeName = (DateTime.Now.Ticks / 10000).ToString() + ".avi";
  
          File.Copy(MusicPath.Text, Environment.CurrentDirectory + "\\" + fileMusic, true);
          File.Copy(ImagePath.Text, Environment.CurrentDirectory + "\\" + fileImage, true);
  
          Upload.Text = "Mixing Music and Image...";
          var mix = Process.Start("ffmpeg.exe", "-loop 1 -r 1 -i " + fileImage + " -i " + fileMusic + " -shortest -vcodec mpeg4 -qscale:v 1 -acodec pcm_alaw -vf scale=\"'iw*max(1280/iw\\,720/ih)':'ih*max(1280/iw\\,720/ih)'\" " + fileTimeName);
  
          File.Delete(fileMusic);
          File.Delete(fileImage);
  
          Upload.Text = "Uploading...";
  
          newVideo.YouTubeEntry.MediaSource = new MediaFileSource(fileTimeName, "video/avi");
          Video createdVideo = request.Upload(newVideo);
  
          Upload.Text = "Uploaded!";
          File.Delete(fileTimeName);
  </code></pre>
  
  <p>It fails right at the Upload Request near the very end, and I cannot figure out why. The end file uploaded is generated by FFmpeg, and I've tested it thoroughly, so the uploaded file is of no concern, even the size is a mere 30-40mb at the most.</p>
  
  <p>The Timeout is set to -1, and so theoretically will never trigger. The only thing I can possibly guess is that the authentication is failing.</p>
  
  <p>If anyone has any sort of experience, I would greatly appreciate help, since this is driving me crazy.</p>