title: System.AggregateException in the client.GetAsync
body: <p>I am trying call the third party api in the Controller of the ASP.NET Web API I am creating.Below is the code</p>
  
  <pre><code>   public string Get(string Name)
      {
          using (var client = new HttpClient())
          {
              string BaseURL = ConfigurationManager.AppSettings["BaseURL"];
              Uri uri = new Uri(BaseURL);
              client.BaseAddress = uri;
              client.DefaultRequestHeaders.Accept.Clear();
              client.DefaultRequestHeaders.Accept.Add(new MediaTypeWithQualityHeaderValue("application/xml"));
              string clarity_URL = BaseURL+"api/v2/hhgh?name="+Name;
              var response = client.GetAsync(c_URL).Result;
              string responseString;
              if (response.IsSuccessStatusCode)
              {
                  responseString = response.Content.ReadAsStringAsync().Result;
              }
                 return responseString;
  </code></pre>
  
  <p>I am getting error in the <code>var response = client.GetAsync(clarity_URL).Result;</code> as the System.AggregateException</p>
  
  <p><a href="https://i.stack.imgur.com/9JBAp.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/9JBAp.jpg" alt="enter image description here"></a></p>
  
  <p>When I expanded the InnerException</p>
  
  <p><code>{"An error occurred while sending the request."}</code>
  <code>{"The underlying connection was closed: Could not establish trust relationship for the SSL/TLS secure channel."}</code>
  <code>{"The remote certificate is invalid according to the validation procedure."}</code></p>