title: c# httpwebrequest follow redirect
body: <p>Httpwebrequest doesn't seem to be following the auto redirect from request</p>
  
  <pre><code>HttpWebRequest request = (HttpWebRequest)WebRequest.Create(Https://www.example.com);
  request.AllowAutoRedirect = true;
  </code></pre>
  
  <p>which redirects to </p>
  
  <pre><code>https://www.example.com/pageunknown
  </code></pre>
  
  <p>however</p>
  
  <pre><code>HttpWebResponse response = (HttpWebResponse)request.GetResponse()
  </code></pre>
  
  <p>is reading the contents from </p>
  
  <pre><code>Https://www.example.com
  </code></pre>
  
  <p>and not the redirects content</p>
  
  <pre><code>https://www.example.com/pageunknown
  </code></pre>
  
  <p>how can I get it so that the redirection is followed and httpwebresponse reads from the redirection page and not the original url/request?</p>