title: Sync and Async problem. System.aggregateexception 'one or more errors occurred.' when I try to get a list of objects from an URL
body: <p>So, I am trying to get a json with a list of movies from tmdb and for that I've created the methods down here. The problem is that if a run it syncronously it gave me TimeOut.</p>
  
  <pre><code>public void getMovieInfo(string kWord)
          {
  
              using (WebClient web = new WebClient())
              {
                  string url = string.Format("https://api.themoviedb.org/3/search/movie?page=1&amp;api_key=" + apiKey + "&amp;query=" + kWord);
  
                  var json = web.DownloadString(url);
  
  
  
                  var result = JsonConvert.DeserializeObject&lt;JsonExtract.root&gt;(json);
                  JsonExtract.root outPut = result;
  
  
                  movies.Clear();
                  int accesIndex = 0;
                  while (outPut.results != null)
                  {
                      movies.Add(outPut.results[accesIndex++].title);
                  }
              }
          }
  </code></pre>
  
  <p>If I return a Task.Result </p>
  
  <pre><code>public async Task&lt;string&gt; getMovieInfoAsync(string kWord)
          {
  
              using (WebClient web = new WebClient())
              {
                  string url = string.Format("https://api.themoviedb.org/3/search/movie?page=1&amp;api_key=" + apiKey + "&amp;query=" + kWord);
  
                  var json = web.DownloadString(url);
  
  
  
                  var result = JsonConvert.DeserializeObject&lt;JsonExtract.root&gt;(json);
                  JsonExtract.root outPut = result;
  
  
                  movies.Clear();
                  int accesIndex = 0;
                  while (outPut.results != null)
                  {
                      movies.Add(outPut.results[accesIndex++].title);
                  }
              }
  </code></pre>
  
  <p>And calling like this it work but freeze for like 3 seconds on first call</p>
  
  <pre><code>getMovieInfoAsync(keyword);
  </code></pre>
  
  <p>And if a calling like this it gave me 'System.aggregateexception 'one or more errors occurred.'</p>
  
  <pre><code>Task&lt;string&gt; task = Task.Run(async () =&gt; await getMovieInfoAsync(keyword));
  task.Wait();
  movies = task.Result;
  </code></pre>
  
  <p>I've search and tryed bunch of hours for a solution but didn't succeed yet.
  Can sameone give me any pointers of why is this happening, or can explain me what do I do wrong. 
  Thank you</p>