title: first HttpWebResponse.GetResponseStream() fails, second one works?
body: <p>I am creating a program that auto login into a website using forms authentication. When ever I call my method to connect to the website, it returns me a empty document text. However, if I call the same method a second time, it works perfectly. 
  Here is my code :</p>
  
  <pre><code>//perform authentication and stores the session in the cookiecontainer
  private void loginToSite()
  {
  // prepare the web page we will be asking for
  request = (HttpWebRequest)
  WebRequest.Create(@"http://diary.com/notes/my_journal");
  request.KeepAlive = true;
  
  //========================================
  //start of forms authentication parameters
  //========================================
  string authInfo = username + ":" + password;
  authInfo = Convert.ToBase64String(Encoding.Default.GetBytes(authInfo));
  request.Headers["Authorization"] = "Basic " + authInfo;
  //========================================
  //end of forms authentication parameters
  //========================================
  
  request.ContentType = "text/html";
  
  request.Method = "GET";
  request.AllowAutoRedirect = true;
  request.Referer = @"http://diary.com/";
  request.CookieContainer = new CookieContainer();
  
  // execute the request
  HttpWebResponse response = (HttpWebResponse)
      request.GetResponse();
  
  // we will read data via the response stream
  Stream resStream = response.GetResponseStream();
  
  container = request.CookieContainer;
  
  //assign the http content to myWB for manipulation
      //myWB is a WebBrowser object that have been declared
  myWB.DocumentStream = resStream;
  
  //prevent script errors from popping up
  myWB.ScriptErrorsSuppressed = true;
  
      MessageBox.Show(myWB.DocumentText);
  }
  </code></pre>