views:

53

answers:

1

Hello, my Code:

System.Net.HttpWebRequest req = (System.Net.HttpWebRequest)System.Net.WebRequest.Create("http://192.168.2.2/web/movielist");
req.Timeout = 2000;
System.Net.WebResponse res = req.GetResponse();
System.IO.Stream responseStream = res.GetResponseStream();

The requested document (movielist) is a very big document and it requires more than 10 seconds to retrieve it complete.

I want to only set a timeout for establishing the connection itself. As far as i can see req.Timout is a timeout for the whole request not only establishing the connection. There should be no timout for retrieving the document.

thanks