title: C# multiple DownloadString in loop, 500 error
body: <p>Basically what i am doing is trying to get a bunch of HTML links from a HTML page.</p>
  
  <p>First i download the HTML Page as a string. I then search that string for a bunch of HTML links and stick them into a list which is then displayed in the app. That all works fine.</p>
  
  <p>Next i need to download each one of those HTML links in the list as a string, and again search for more HTML links and stick those into a list as well. But i am getting a "500 internal server error".</p>
  
  <p>Here is the code for the first DownloadString:</p>
  
  <pre><code>WebClient client = new WebClient();
  data = client.DownloadString(URLMain);
  client.Dispose();
  </code></pre>
  
  <p>The HTML links are identified from the data and stuck into a list. I am then using this code to loop through and download each link:</p>
  
  <pre><code>WebClient client2 = new WebClient();
  for (int i = 1; i &lt;= listBox1.Items.Count; i++)
  {
      data = client2.DownloadString(listBox1.Items[i].ToString());
  
      //Search data for HTML link, stick link into list, clear data, and repeat X times.
  }
  </code></pre>
  
  <p>Im not really sure what im doing wrong. Kinda new to C#. But as mentioned in just getting a 500 internal server error on the second part of code. Maybe im requesting too fast? Any help would be much appreciated as this is my last hurdle in completing this program.</p>
  
  <p>--------------UPDATE</p>
  
  <p>Ok i have some progress. I rewrote the download loop differently using some source code i found on the web. "Start Multiple Async Tasks and Process Them As They Complete"</p>
  
  <p>I am no longer getting a 500 server error, and i am able to download multiple stuff without getting errors. But i suspect that there is something wrong with the URLs. I am not getting the data that i should be receiving.</p>
  
  <p>I tried setting the list of URLs to the same main URL which is "kissanime.com/Anime/Accel-World" and that returns the correct html as a string. So i know that the download request is working fine.</p>
  
  <p>But when the url is this "kissanime.com/Anime/Accel-World/Episode-001?id=4609" it doesn't return the data it should return. Instead it returns this: <a href="http://pastebin.com/C9vH01Lc" rel="nofollow">http://pastebin.com/C9vH01Lc</a></p>
  
  <p>Although when i try that exact link in a browser it opens fine to the correct page.
  I have also tried changing the links to "kissanime.com/Anime/Accel-World/Episode-001" which still produces the same results.</p>
  
  <p>So something is wrong with the URLs. Any ideas?</p>