HttpWebRequest times out with multiple network adaptors enabled

Posted by Tim on Stack Overflow See other posts from Stack Overflow or by Tim
Published on 2010-03-23T11:27:38Z Indexed on 2010/03/23 11:33 UTC
Read the original article Hit count: 335

Filed under:
|
|

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();
                }
            }

© Stack Overflow or respective owner

Related posts about c#

Related posts about httpwebrequest