title: Gdrive unable to download and not upload
body: <p>I am using GDRive insertFile and RevtrieveAllFiles to upload and download files to googledrive.
  I created a client secret and Id and modified the credentials.
  the code is based on the post in code project <a href="http://www.codeproject.com/KB/WPF/488185/GDrive_Uploader_Sample.zip" rel="nofollow">http://www.codeproject.com/KB/WPF/488185/GDrive_Uploader_Sample.zip</a> </p>
  
  <p>but it fails debuggin the Utilities.InsertFile
  in the file.upload it fails with exceptionvalue cannot be null - uriString .
  in the download it fails in  <code>FileList files = request.Fetch();</code> with</p>
  
  <pre><code> // First, create a reference to the service you wish to use.
      // For this app, it will be the Drive service. But it could be Tasks, Calendar, etc.
      // The CreateAuthenticator method is passed to the service which will use that when it is time to authenticate
      // the calls going to the service.
      _service = new DriveService(CreateAuthenticator());
  
      // Open a dialog box for the user to pick a file.
      OpenFileDialog dialog = new OpenFileDialog();
      dialog.AddExtension = true;
      dialog.DefaultExt = ".txt";
      dialog.Filter = "Text files (*.txt)|*.txt|All files (*.*)|*.*";
      dialog.Multiselect = false;
      dialog.ShowDialog();
  
  
      File body = new File();
      body.Title = System.IO.Path.GetFileName(dialog.FileName);
      body.Description = "A test document";
      body.MimeType = "text/plain";
  
      System.IO.Stream fileStream = dialog.OpenFile();
      byte[] byteArray = new byte[fileStream.Length];
      fileStream.Read(byteArray, 0, (int)fileStream.Length);
  
      System.IO.MemoryStream stream = new System.IO.MemoryStream(byteArray);
  
      // Get a listing of the existing files...
      List&lt;File&gt; fileList = Utilities.RetrieveAllFiles(_service);
  
      // Set a flag to keep track of whether the file already exists in the drive
      bool fileExists = false;
  
      foreach (File item in fileList)
      {
          if (item.Title == body.Title)
          {
              // File exists in the drive already!
              fileExists = true;
              MessageBoxResult result = System.Windows.MessageBox.Show("The file you picked already exists in your Google Drive. Do you wish to overwrite it?", "Confirmation", MessageBoxButton.YesNoCancel);
              if (result == MessageBoxResult.Yes)
              {
  
                  // Yes... overwrite the file
                  Utilities.UpdateFile(_service, item.Id, item.Title, item.Description, item.MimeType, dialog.FileName, true);
                  List&lt;File&gt; allFiles = Utilities.RetrieveAllFiles(_service);
  
              }
  
              else if (result == MessageBoxResult.No)
              {
  
                  // MessageBoxResult.No code here
                File f=             Utilities.insertFile(_service, System.IO.Path.GetFileName(dialog.FileName), "An uploaded document", "", "text/plain", dialog.FileName);
              }
  
              else
              {
  
                  // MessageBoxResult.Cancel code here
                  return;
              }
              break;
          }
      }
  
      // Check to see if the file existed. If not, it is a new file and must be uploaded.
      if (!fileExists)
      {
        File file=  Utilities.insertFile(_service, System.IO.Path.GetFileName(dialog.FileName), "An uploaded document", "", "text/plain", dialog.FileName);
        var list = Utilities.RetrieveAllFiles(_service);
  
      }
  
      System.Windows.MessageBox.Show("Upload Complete");
  </code></pre>