Hi Guys,

I have maybe 3 POST requests in a piece of code, in each httpwebrequest i have:

vb.net Code:
  1. '// Has proxies been used?
  2.                 If (formProxies.listViewProxies.Items.Count > 0) Then
  3.  
  4.                     '// Initialise the random user agent code
  5.                     Dim randomProxy As New Random
  6.  
  7.                     '// Set a variable to store the random proxy
  8.                     Dim randonProxySelected = formProxies.listViewProxies.Items.Item(randomProxy.Next(0, formProxies.listViewProxies.Items.Count))
  9.  
  10.                     '// If it's greater than 0 there are proxies loaded
  11.                     Dim ProxyArray As Array = Split(randonProxySelected.Text, ":")
  12.  
  13.                     'MessageBox.Show(ProxyServer)
  14.                     Dim ProxyServer As String = ProxyArray(0).ToString
  15.                     Dim ProxyPort As Integer = ProxyArray(1).ToString
  16.  
  17.                     '// Setup the proxy
  18.                     .Proxy = New WebProxy("http://" & ProxyServer & ":" & ProxyPort)
  19.  
  20.                 End If

Which selects a random proxy from a listview, some of them are hanging, should the same proxy be used on every httpwebrequest in the same piece of code? the way it is now, on every request 3 random proxies are chosen, i'm not sure if that's whats causing the hanging to happen.

thanks for any info guys

Graham