title: Content.ReadAsStreamAsync() - Read and Write Time out error asp.net web api
body: <p>Im trying to make a call to an external api [ASP.NET core 3.1]with the following code:</p>
  <pre><code>    public async Task&lt;IActionResult&gt; Get()
      {
               var request = new HttpRequestMessage(HttpMethod.Get,url);
              var Client = _httpClientFactory.CreateClient();
              var response = await Client.SendAsync(request);
              if (response.IsSuccessStatusCode)
              {
                  var responseStream = await response.Content.ReadAsStreamAsync( );
  
                  Results = await JsonSerializer.
                  DeserializeAsync&lt;IEnumerable&lt;Result&gt;&gt;(responseStream);
              }
         
              else
              {
                  Results = Array.Empty&lt;Result&gt;();
              }
      }
  </code></pre>
  <p>The code seems to fail on the following line :</p>
  <p>var responseStream = await response.Content.ReadAsStreamAsync( );</p>
  <p>The responseStream seems to return Read and Write Time out error, not sure why?
  Please assist.</p>
  <p><a href="https://i.stack.imgur.com/oR8Fe.png" rel="nofollow noreferrer">Error Image</a></p>