title: Error getting response stream (ReadDone2): Receive Failure
body: <p>Help me please.
  After sending post query i have webexception "Error getting response stream (ReadDone2): Receive Failure". help get rid of this error. thanks.</p>
  
  <p>piece of code</p>
  
  <pre><code>try
  {
  string queryContent = string.Format("login={0}&amp;password={1}&amp;mobileDeviceType={2}/",
  login, sessionPassword, deviceType);
  request = ConnectionHelper.GetHttpWebRequest(loginPageAddress, queryContent);
  
  using (HttpWebResponse response = (HttpWebResponse)request.GetResponse())//after this line //occurs exception - "Error getting response stream (ReadDone2): Receive Failure"
  {
  
  ConnectionHelper.ParseSessionsIdFromCookie(response);
  
  string location = response.Headers["Location"];
  if (!string.IsNullOrEmpty(location))
  {
  string responseUri = Utils.GetUriWithoutQuery(response.ResponseUri.ToString());
  string locationUri = Utils.CombineUri(responseUri, location);
  result = this.DownloadXml(locationUri);
  }
  response.Close();
  }
  }
  catch (Exception e)
  {
  errorCout++;
  errorText = e.Message;
  }
  </code></pre>
  
  <p>//Methot GetHttpWebRequest</p>
  
  <pre><code>    public static HttpWebRequest GetHttpWebRequest(string uri, string queryContent)
      {
          HttpWebRequest request = (HttpWebRequest)HttpWebRequest.Create(uri);            
          request.Proxy = new WebProxy(uri);
          request.UserAgent = Consts.userAgent;
          request.AutomaticDecompression = DecompressionMethods.GZip;
          request.AllowWriteStreamBuffering = true;
          request.AllowAutoRedirect = false;
  
          string sessionsId = GetSessionsIdForCookie(uri);
          if (!string.IsNullOrEmpty(sessionsId))
              request.Headers.Add(Consts.headerCookieName, sessionsId);
  
          if (queryContent != string.Empty)
          {
              request.ContentType = "application/x-www-form-urlencoded";
              request.Method = "POST";
              byte[] SomeBytes = Encoding.UTF8.GetBytes(queryContent);
              request.ContentLength = SomeBytes.Length;
              using (Stream newStream = request.GetRequestStream())
              {
                  newStream.Write(SomeBytes, 0, SomeBytes.Length);
              }
          }
          else
          {
              request.Method = "GET";
          }
  
          return request;
      }
  </code></pre>