I want to send multiple WebRequest
. I used a Parallel.For
loop to do that but the loop runs once and the second time it gives error while getting r
In addition to what Jim Mischel said about calling Close on the response, you also need to factor in that, by default, .NET limits an application to only two active HTTP connections per domain at once. To change this you can set System.Net.ServicePointManager.DefaultConnectionLimit programmatically or set the same thing via config using the <system.net><connectionManagement> configuration section.
Most likely the problem is that you need to call response.Close()
after you're done processing the response.