title: ArgumentNullException: "baseUri" is null, when uploading a file to Google Drive
body: <p>I'm uploading files to Google Drive following the tutorial found here: </p>
  
  <p><a href="https://developers.google.com/drive/web/quickstart/quickstart-cs" rel="nofollow">https://developers.google.com/drive/web/quickstart/quickstart-cs</a></p>
  
  <p>I have created an Id and Secret for my main account, and with that info, I could upload to any of my two accounts (deleting the authentication token from %AppData%/Google...). </p>
  
  <p>However, a client gave us his google account so we can try that everything would work for him, it didn't work for his account. We can upload and download files through the web interface without any problem, but it doesn't work with my app.</p>
  
  <p>One difference I noticed is that my client's account didn't have a google e-mail address; it was name@myclient.com, so I created a new google account with my work e-mail address, tested it, and it worked flawlessly after just loggin into Google Drive.</p>
  
  <p>The problem arises in the last lines:</p>
  
  <pre><code>FilesResource.InsertMediaUpload request = service.Files.Insert(body, stream, "text/plain");
  request.Upload();
  
  File file = request.ResponseBody;
  Console.WriteLine("File id: " + file.Id);
  </code></pre>
  
  <p>At that point, request.ResponseBody is null so, if I just run the code, file.Id throws an ArgumentNullException. If I break into debug mode and examine the environment instead, request.Progress (private property from a base class) has its Status field set to "Failed", and the Exception field is a ArgumentNullException, with the message "Argument can not be null. Argument name: baseUri.".</p>
  
  <p>Any idea about what could be wrong?</p>
  
  <p><strong>Update:</strong> 
  The code to create the service object:</p>
  
  <pre><code>// Create the service.
  var service = new DriveService(new BaseClientService.Initializer()
  {
      HttpClientInitializer = credential,
      ApplicationName = "Drive API Sample",
  });  
  </code></pre>