HttpWebRequest times out with multiple network adaptors enabled
- by Tim
On my Win7 PC I have a couple of virtual network adaptors that are used for VMWare server.
My HttpWebRequest times out when I have these adaptors enabled. Should I really have to tell it which adaptor to bind to?
HttpWebRequest request = (HttpWebRequest)WebRequest.Create(url.AbsoluteUri + "etc.txt");
request.Timeout = 2000;
using (HttpWebResponse response = (HttpWebResponse)request.GetResponse())
{
using (StreamReader reader = new StreamReader(response.GetResponseStream()))
{
return reader.ReadToEnd();
}
}