title: c# HttpWebRequest.GetResponse() returned an error: (404) Not Found
body: <p>I have an Asp.net console application and i use this code for upload file:</p>
  
  <pre><code>byte[] buffer = memoryStream.ToArray();
  HttpWebRequest request = (HttpWebRequest)WebRequest.Create(url);
  request.ContentType = "application/octet-stream";
  request.Method = "POST";
  request.ContentLength = buffer.Length;
  Stream dataStream = request.GetRequestStream();
  dataStream.Write(buffer, 0, buffer.Length);
  dataStream.Close();
  response = (HttpWebResponse)request.GetResponse();
  </code></pre>
  
  <p>If the buffer size 8 MB the HttpWebResponse work perfect but if the buffer size 32 MB the request.GetResponse() returned an error: </p>
  
  <blockquote>
    <p>The remote server returned an error: (404) Not Found.</p>
  </blockquote>