Click to See Complete Forum and Search --> : unstable performance for WebRequest.GetResponse under ASP .NET (host in windows 2000


yccheok
December 19th, 2002, 08:48 PM
i have the following code in my aspx file with page language written in vb. the following code is as follow

Sub Button1_Click(sender As Object, e As EventArgs)
' more code to initialize ip and encryptstr

try
req = System.Net.WebRequest.Create("http://"+ip+":5050/service?"+encryptStr)
req.Timeout = 10000
result = req.GetResponse()
catch se as Exception
end try
End Sub

i try to send a web request from my windows 2000 professional to my own built http server located in another windows 98. the above code is very unstable.

i use a internet browser in pocket pc emulator to retrieve the web form. i click on the button and the browser have to wait almost 10 seconds then only the http connection between pocket pc and windows 2000 computer complete.

sometimes, my http server can get the response very fast (as fast as when u click on the button, it immediately receive the request). sometimes it takes approximate ten seconds to obtain the request.

they should be no problem for my http server side coz i try to execute that URL within a browser by entering the URL in address bar of the browser. it gets the response immediately.

i suspect is the way that ASP .NET perform the web request where it does not send out the request immediately. i had try to change the synchronous GetResponse to asynchronous BeginGetResponse. yet, it still face the same problem :(

fyi, i test this web form with pocket pc emulator with.

can anyone provide me suggestion on solving this problem. i suspect
(1) ASP .NET has problem with the pocket pc when deal with WebRequest.
(2) I should upgrade windows 2000 professional to server edition
(4) what else???

thank you.

regards
yccheok