title: Access pages with forms authentication from c#
body: <p>I'm trying to implement the code from this page: <a href="http://www.ksingla.net/2006/08/sample_forms_authentication_test_in_csharp/" rel="nofollow">http://www.ksingla.net/2006/08/sample_forms_authentication_test_in_csharp/</a></p>
  
  <p>It's working as expected all the way until the last response</p>
  
  <pre><code>        String cookie = response.GetResponseHeader("Set-Cookie");
  
          request = (HttpWebRequest)WebRequest.Create(...);
          request.AllowAutoRedirect = false;
          request.Headers.Add(HttpRequestHeader.Cookie, cookie);
          response = (HttpWebResponse)request.GetResponse();
  </code></pre>
  
  <p>That gives me a timeout :(</p>
  
  <p>And I do have content in the cookie variable.</p>
  
  <p>Any suggestions?</p>