title: HttpServerUtility.Execute blocked while waiting for an asynchronous operation to complete for Social Providers
body: <p>As Asked <a href="https://stackoverflow.com/questions/30467185/httpserverutility-execute-blocked-while-waiting-for-an-asynchronous-operation-to">Question1</a>, <a href="https://stackoverflow.com/questions/28079613/html-action-is-raising-httpserverutility-execute-blocked-while-waiting-for-an">Question2</a> from other users but there is no any proper answer got so I asked here.</p>
  
  <p>I am using ASP.NET MVC and trying to load social logins providers by partial view.</p>
  
  <p>But I can't it gives me an error.</p>
  
  <p><a href="https://i.stack.imgur.com/oi97a.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/oi97a.png" alt="enter image description here"></a></p>
  
  <p>This is my code from where I return my partial view:</p>
  
  <pre><code> public async Task&lt;PartialViewResult&gt; GetProviders()
          {
              string apiUrl = "mywebsite";
  
              using (HttpClient client = new HttpClient())
              {
                  client.BaseAddress = new Uri(apiUrl);
                  client.DefaultRequestHeaders.Accept.Clear();
                  client.DefaultRequestHeaders.Accept.Add(new System.Net.Http.Headers.MediaTypeWithQualityHeaderValue("application/json"));
  
                  HttpResponseMessage response = await client.GetAsync("Account/externalloginpathhere");
                  //var result = Task.Run(async () =&gt; { await client.GetAsync("Account/externalloginpathhere"); }).Result;
                  if (response.IsSuccessStatusCode)
                  {
                      var data = await response.Content.ReadAsStringAsync();
                      var providers = Newtonsoft.Json.JsonConvert.DeserializeObject&lt;List&lt;ViewModel&gt;&gt;(data);
  
                      foreach(var provider in providers)
                      {
                          if (provider.Name == "Google")
                          {
                              //code come here
                          }
                          else if (provider.Name == "Facebook")
                          {
                              //code come here
                          }
                          else if (provider.Name == "Microsoft")
                          {
                              //code come here
                          }
                      }
                      return PartialView("~/Views/Account/_ExternalLoginsListPartial.cshtml", providers);
                  }
                  return null;
              }
          }
  </code></pre>
  
  <p>View calling from Home Controller View:</p>
  
  <pre><code>@{Html.RenderAction("GetProviders", "Account");}
  </code></pre>
  
  <p>This is what I have done please correct me whereever I goes wrong!</p>