Little Problem with HttpWebResponse...;-(

Jul 14 2004 5:14 PM
Hello, i am trying to get a HttpResponse with the following code: username = "Pandemon"; HttpWebRequest request = (HttpWebRequest)HttpWebRequest.Create("http://80.237.203.23/ds/ranking.php?world=1&player="+username); HttpWebResponse response = (HttpWebResponse)request.GetResponse(); Stream resStream = response.GetResponseStream(); byte[] buf = new byte[10000]; int count = resStream.Read(buf, 0, buf.Length); String result = Encoding.ASCII.GetString(buf, 0, buf.Length); response.Close(); This code strip is called in a loop and change the username variable in every loop sequenz. All works fine for the first request. All further loops retrieve only a part of the first response length. I check this with the count variable. Can there be an session problem or something like that? If i start the application new, the first request is fine again, all next are less count bytes. I have tried it with static html URL's, and it work for many loops. every time the same count result. Can somebody help me? Greetz, Pandemon

Answers (1)