c# - Error getting response stream (ReadDone2): Receive Failure -


Please error to get me to influence "the reaction stream after sending help me to post the quarter (Reed Don 2): Get the finder ". Help get rid of this error. Thank you

code snippet

  try {String queryContent = String.Format ( "login = {0} & amp; password = {1} & amp; mobileDeviceType = { 2} / ", login, session password, device type); Request = Connection Helper.GetHttpWebRequest (loginpassword, query content); (HttpWebResponse response = (HttpWebResponse) request.GetResponse ()) using // occurs exception after the line // - Error response stream to receive "(ReadDone2): Get failed" {ConnectionHelper.ParseSessionsIdFromCookie (reaction ); String position = response. Header ["location"]; If {string responseUri = Utils.GetUriWithoutQuery (response.ResponseUri.ToString ()) (string.IsNullOrEmpty (location)); String space URI = Eutils.comcombinURI (countercurrent, location); Results = this.DownloadXml (locationUri); } Response.Close (); }} Hold (exception e) {errorCout ++; ErrorText = e.Message; }   

// Methot GetHttpWebRequest

  public static HttpWebRequest GetHttpWebRequest (String uri, String queryContent) {HttpWebRequest request = (HttpWebRequest) HttpWebRequest.Create (URI) ; request. Proxy = new webpropy (Yuri); Request.UserAgent = Consts.userAgent; request. Automatic Decompression = Depression Remover GGIP; Request Approved Lightstrom buffering = true; request. Allow AutoRDelect = Incorrect; String sessions = GetSessionsIdForCookie (Yuri); If request.Headers.Add (Consts.headerCookieName, sessionsId) (string.IsNullOrEmpty (sessionsId)!); If (queryContent! = String.Empty) {request.ContentType = "app / x-www-form-urxed"; request. Method = "post"; Byte [] SomeBytes = encoding. UTF8.GetBytes (queryContent); Request.ContentLength = SomeBytes.Length; (Stream NewStream = Request is using GateRquestststream ()) (New Stream. White (some bytes, 0, few bytes.);}} And {request.Method = "GET";} Return request;} < (New stream = request.GetRequestStream ()) by using {newStream / code>   

  Try to add new stream (SomeBytes, 0, SomeBytes.Length); // Close ();}    

Comments

Popular posts from this blog

mysql - BLOB/TEXT column 'value' used in key specification without a key length -

c# - Using Vici cool Storage with monodroid -

python - referencing a variable in another function? -