M
msnews.microsoft.com
Hello everyone I was wondering if anyone has come across my problem? I
programmed a Windows Service that uses httpWebRequest and httpWebResponse in
VB.NET. Everything works fine until I use the webresponse object. What the
Windows Service does is when the timer in the windows service elapses, the
request to the website is made and a response is retrieve in a simple
myhttpWebrequest.GetResponse(). I don't even do anything with the response,
and close out of the response immediately. But the Windows Service then
creates a connection for each call for the website and causes the memory to
increase to 30 MB. When I use a netstat on the server, I see multiple http
connections due to this Windows Service. I tried to set the timeout on the
myhttpWebRequest but it does nothing. Is there a way to make the
application to disconnect after the connection and call to the website has
been made? Thanks.
programmed a Windows Service that uses httpWebRequest and httpWebResponse in
VB.NET. Everything works fine until I use the webresponse object. What the
Windows Service does is when the timer in the windows service elapses, the
request to the website is made and a response is retrieve in a simple
myhttpWebrequest.GetResponse(). I don't even do anything with the response,
and close out of the response immediately. But the Windows Service then
creates a connection for each call for the website and causes the memory to
increase to 30 MB. When I use a netstat on the server, I see multiple http
connections due to this Windows Service. I tried to set the timeout on the
myhttpWebRequest but it does nothing. Is there a way to make the
application to disconnect after the connection and call to the website has
been made? Thanks.