i'm programming an application, which relies on downloading stuff from the i-net.
or this version of it
are causing a timeout exception after a minute of application hang. looking at it in wireshark, you see that no request has been submitted. the trick is: this bug appears sporadically every 3-4 times downloading something.
static private string Download(string url)
HttpWebRequest req = (HttpWebRequest)WebRequest.Create(url);
req.Method = "GET";
WebResponse respon = req.GetResponse();
Stream res = respon.GetResponseStream();
string ret = "";
byte buffer = new byte;
int read = 0;
while ((read = res.Read(buffer, 0, buffer.Length)) > 0)
ret += Encoding.ASCII.GetString(buffer, 0, read);
plz help me