title: HttpClient.SendAsync sits and never progress, even though the data sent is processed
body: <p>I am having to rewrite an application from <code>ASP.Net Core</code> to <code>ASP.Net 4.6.1</code> and in the core version of the application I am sending <code>Json</code> data to BugZilla for processing and it works fine. It sends the data and gets the response back fairly quickly. That same code in the 4.6.1 version of the application sits and hangs on the send command. I can go into BugZilla and see that it got the data and generated the bug but even after 15 minutes the application does not progress. I am brand new to Task and sending data via Json so I am not sure why I am running into this problem. No errors are ever returned and in debug mode I can step through everything and know that it is handing and waiting at the <code>SendAsync</code> line. What am I doing wrong that breaks this in 4.6.1?</p>
  
  <pre><code>private static async Task&lt;int&gt; LogToBugZilla(string Component, Exception ex)
  {
      var ErrorSummary = "Auto Error Logging: " + ex.Message + " " + ex.InnerException.Message;
  
      var BugData = new Dictionary&lt;string, string&gt;
      {
          { "Bugzilla_api_key", ConfigurationManager.AppSettings["BugZillaAPIKey"] },
          { "product", "Job Site" },
          { "component", Component },
          { "version", ConfigurationManager.AppSettings["AppVersion"] },
          { "summary", ErrorSummary },
          { "op_sys", "All" },
          { "platform", "Other" },
          { "description", ex.StackTrace + ex.InnerException.StackTrace }
      };
  
      string Json = JsonConvert.SerializeObject(BugData, Formatting.None);
      var Client = new HttpClient();
      var Request = new HttpRequestMessage(HttpMethod.Post, "http://bugzilla/rest/bug");
      Request.Content = new StringContent(Json, Encoding.UTF8, "application/json");
      Request.Headers.Add("Accept", "application/json");
      var Response = await Client.SendAsync(Request);
      var JsonResults = await Response.Content.ReadAsStringAsync();
  
      if (Response.StatusCode == HttpStatusCode.OK)
      {
          var Results = JsonConvert.DeserializeObject&lt;Dictionary&lt;string, int&gt;&gt;(JsonResults);
          return Results["id"];
      }
      else
      {
          return -1;
      }
  }
  </code></pre>
  
  <p>Edit:</p>
  
  <pre><code>public static string ProcessError(Exception ex, string OriginatingController)
  {
      var Component = GetComponent(OriginatingController);
      string UserErrorMessage = "";
  
      switch (ex.GetType().ToString())
      {
          case "System.Data.DataException":
              LogToITSupport("Database Connection");
              UserErrorMessage = @"An error has accrued connecting to the database. &lt;a href=""mailto:""&gt;IT Support&lt;/a&gt; has been notified  of this error. Please try your request again later, thank you.";
              break;
  
          default:
              var BugID = LogToBugZilla(Component, ex).Result;
              UserErrorMessage = @"An error has accrued processing your request and a log of this error has been made on the &lt;a href=""http://bugzilla/show_bug.cgi?id=" + BugID + "\"&gt;Internal Tools BugZilla system&lt;/a&gt; with an ID of " + BugID + ". Please try your request again later, thank you.";
              break;
      }
  
      return UserErrorMessage;
  }
  </code></pre>
  
  <p>And to just restate, the application hangs on the code <code>var Response = await Client.SendAsync(Request);</code></p>
  
  <p>Edit 2:</p>
  
  <p>Contrller Code:</p>
  
  <pre><code>public ActionResult About()
  {
      try
      {
          using (var db = new JobSightDbContext())
          {
              var model = db.ReleaseVersions
                              .OrderByDescending(rv =&gt; rv.DateReleased)
                              .Select(rv =&gt; new ReleaseNotesVM()
                              {
                                  ID = rv.ID,
                                  CurrentVersion = string.Concat(rv.Major, ".", rv.Minor, ".", rv.Patch),
                                  CurrentVersionReleaseDate = rv.DateReleased,
                                  ReleaseNotes = rv.ReleaseNotes.Select(rn =&gt; rn.Note).ToList()
                              }).First();
  
              //model.VersionList = db.ReleaseVersions
              //                      .OrderByDescending(rv =&gt; rv.DateReleased)
              //                      .Select(rv =&gt; new SelectListItem()
              //                      {
              //                          Value = rv.ID.ToString(),
              //                          Text = string.Concat(rv.Major, '.', rv.Minor, '.', rv.Patch)
              //                      }).ToList();
  
              return View(model);
          }
      }
      catch (System.Data.DataException ex)
      {
          ViewBag.ErrorMessage = EHALM.ProcessError(ex, RouteData.Values["controller"].ToString());
          return View("Dashboard");
      }
  }
  </code></pre>