title: Multiple HttpWebRequest in loop?
body: <p>I have to call web-service multiple time (in loop) the problem is that my code always return empty object (Image Description) and doesn't run properly when I tested it separately (out of loop) it worked normally</p>
  
  <p>here is my portion of code</p>
  
  <pre><code>HttpWebRequest httpReq = (HttpWebRequest)HttpWebRequest.Create(new Uri(imageCollection[i].ImageTag));
  
              httpReq.BeginGetResponse(new AsyncCallback((iar) =&gt;
               {
                   try
                   {
                       string strResponse = "";
                       var response = (HttpWebResponse)((HttpWebRequest)iar.AsyncState).EndGetResponse(iar);
  
                       Stream stream = response.GetResponseStream();
                       StreamReader reader = new StreamReader(stream);
                       strResponse = reader.ReadToEnd();
  
                       HtmlDocument htmlDocument = new HtmlDocument();
                       htmlDocument.OptionFixNestedTags = true;
                       htmlDocument.LoadHtml(strResponse);
                       HtmlAgilityPack.HtmlNode titleNode = htmlDocument.DocumentNode.SelectSingleNode("//meta[@property='og:description']");
  
                       if (titleNode != null)
                       {
                           string desc = titleNode.GetAttributeValue("content", "");
                           imageCollection[i].ImageDescription = desc;
                       }
                   }
                   catch (Exception ex)
                   {
                       throw ex;
                   }
  
               }), httpReq);
  
              httpReq.Abort();
  </code></pre>