title: .NET HTTP POST Method - Cookies issue
body: <p>I'm trying to use C# to login to hotfile.com. The first big issue was to overcome the 417 Error, which this line solved it:</p>
  
  <pre><code>System.Net.ServicePointManager.Expect100Continue = false;
  </code></pre>
  
  <p>Now I'm getting this error as I try to login using POST:</p>
  
  <blockquote>
    <p>You don't seem to accept cookies. Cookies are required in order to log in. Help</p>
  </blockquote>
  
  <p>I've tried several times, and googled around and I still can't login to Hotfile.com.. My code is this:</p>
  
  <pre><code>string response;
  byte[] buffer = Encoding.ASCII.GetBytes("user=XX&amp;pass=XX");
  
  CookieContainer cookies = new CookieContainer();
  HttpWebRequest WebReq = (HttpWebRequest)WebRequest.Create("http://hotfile.com/login.php");
  WebReq.Credentials = new NetworkCredential("XX", "XX");
  WebReq.PreAuthenticate = true;
  WebReq.Pipelined = true;
  WebReq.CookieContainer = cookies;
  WebReq.KeepAlive = true;
  WebReq.Method = "POST";
  WebReq.ContentType = "application/x-www-form-urlencoded";
  WebReq.ContentLength = buffer.Length;
  WebReq.UserAgent = "Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0; SLCC1)";
  
  Stream PostData = WebReq.GetRequestStream();
  PostData.Write(buffer, 0, buffer.Length);
  PostData.Close();
  
  HttpWebResponse WebResp = (HttpWebResponse)WebReq.GetResponse();
  Stream Answer = WebResp.GetResponseStream();
  StreamReader _Answer = new StreamReader(Answer);
  response = _Answer.ReadToEnd();
  File.WriteAllText("dump.html", response);
  </code></pre>
  
  <p>Naturally, the user and pass would have your accounts values.</p>