private void EndReceiveResponse(IAsyncResult ar) { if (!ExecutionContext.IsFlowSuppressed()) { ExecutionContext.SuppressFlow(); } Responce = Request.EndGetResponse(ar) as HttpWebResponse; ResonceStatus = new DownloadStateProvider().GetWebState(Request, Responce); //HandleRedirectAndCookies(obj); //if (TryReceiveData(obj)) //{ // CallbackAndContinue(obj); // return; //} //#if DEBUG // GlobalLog.Write("CANT Downloaded data from " + obj.Uri.Host); //#endif //catch (WebException e) //{ // GlobalLog.Err(e, "Host: " + obj.Uri.Host); // HandleWebState(e, obj); //} //catch (Exception e) //{ // GlobalLog.Err(e, "Host: " + obj.Uri.Host); //} //finally //{ // if (obj.Response != null) // obj.Response.Close(); //} //RetryOrCallback(obj); }
private void EndReceiveResponse(IAsyncResult ar) { if (!ExecutionContext.IsFlowSuppressed()) ExecutionContext.SuppressFlow(); Responce = Request.EndGetResponse(ar) as HttpWebResponse; ResonceStatus = new DownloadStateProvider().GetWebState(Request, Responce); //HandleRedirectAndCookies(obj); //if (TryReceiveData(obj)) //{ // CallbackAndContinue(obj); // return; //} //#if DEBUG // GlobalLog.Write("CANT Downloaded data from " + obj.Uri.Host); //#endif //catch (WebException e) //{ // GlobalLog.Err(e, "Host: " + obj.Uri.Host); // HandleWebState(e, obj); //} //catch (Exception e) //{ // GlobalLog.Err(e, "Host: " + obj.Uri.Host); //} //finally //{ // if (obj.Response != null) // obj.Response.Close(); //} //RetryOrCallback(obj); }