title: Async method does not return asp.net mvc 4
body: <p>I'm having a problem with an async method that I implemented. The method basically makes a HttpRequest to a resource and deserializes the string if the request is successful. I wrote a test for the method, and it works. But the method does never return when I call it from a controller?</p>
  
  <pre><code>    public async Task&lt;IEnumerable&lt;T&gt;&gt; Get()
      {
          try
          {
              var resourceSegmentUri = new Uri(_uri, UriKind.Relative);
  
              var response = await _client.GetAsync(resourceSegmentUri);
  
              if (response.IsSuccessStatusCode)
              {
                  var submission = await response.Content.ReadAsStringAsync();
                  return JsonConvert.DeserializeObject&lt;IEnumerable&lt;T&gt;&gt;(submission);
              }
  
              if (response.Content != null)
              {
                  var message = response.Content.ReadAsStringAsync();
                  throw new WebException(message.Result, (WebExceptionStatus)response.StatusCode);
              }
  
          }
          catch (WebException e)
          {
              Logger.Error("GET Request failed with status: {0}", e.Status);
              throw;
          }
  
          throw new Exception();
      }
  </code></pre>
  
  <p>Code that never returns:</p>
  
  <pre><code>public ActionResult Index()
  {
     var api = new Api();
     var test = api.Get().Result; //Never returns
     return View();
  }
  </code></pre>
  
  <p>Test that works:</p>
  
  <pre><code>[Test]
  public void GetShouldReturnIfSuccessfulRequest()
  {
      var api = new Api();
      var submission = api.Get();
  
      Console.WriteLine(JsonConvert.SerializeObject(submission));
      Assert.NotNull(submission);
  }
  </code></pre>
  
  <p>Does anyone know the problem?</p>