title: ObjectDisposedException even after setting client handler to false so I'm not disposing and using the same instance
body: <p>From reading other posts on stackoverflow, I'm trying to reuse the same httpclient for multiple methods but i'm still getting the error:</p>
  
  <p><code>System.ObjectDisposedException: Cannot access a disposed object. Object name: 'System.Net.Http.HttpClient'.</code></p>
  
  <pre class="lang-cs prettyprint-override"><code>public class Program
  {
      private readonly static HttpClientHandler handler = new HttpClientHandler();
      private readonly static HttpClient client = new HttpClient(handler, false);
  
      public Program()
      {
          client.BaseAddress = new Uri();
          client.DefaultRequestHeaders.Accept.Add(new MediaTypeWithQualityHeaderValue("application/json"));
      }
  
  
      public async IDictionary&lt;string, object&gt; GetCustomer(string customerId)
      {
          using (client)
          {
              try
              {
                   var response = await client.GetAsync().ConfigureAwait(false);
                   response.EnsureSuccessStatusCode();
                   var responseContent = await.result.Content.ReadAsStringAsync();
                   return JsonConvert.DeserializeObject&lt;IDictionary&lt;string, object&gt;(responseContent);
              }
              catch { }
          }
  
      }
  
      public async IDictionary&lt;string, object&gt; GetOrdersByCustomerId(string customerId)
      {
          using (client)
          {
              try
              {
                   var response = await client.GetAsync().ConfigureAwait(false);
                   response.EnsureSuccessStatusCode();
                   var responseContent = await.result.Content.ReadAsStringAsync();
                   return JsonConvert.DeserializeObject&lt;IDictionary&lt;string, object&gt;(responseContent);
              }
              catch { }
          }
  
      }
  }
  </code></pre>
  
  <p>In a separate file, I'm calling these two methods one right after the other as such:</p>
  
  <pre><code>var customer = programInstance.GetCustomer().GetAwaiter().GetResult();
  var orders = programInstance.GetOrdersByCustomerId().GetAwaiter().GetResult();
  </code></pre>
  
  <p>When I call <code>GetCustomer()</code>, the response is 200 OK and I'm able to retrieve the information I want but as soon as I call <code>GetOrdersByCustomerId()</code>, I then get the error message stated earlier.</p>
  
  <p>I've been reading about whether httpclient needs to be dispose or how some people got rid of the error by grabbing the handler and setting dispose to false but it doesn't look like it's working out for me.</p>
  
  <p>Is there something I'm missing here?</p>