473,387 Members | 1,542 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

HttpWebResponse Memory Size Problems

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. Another person replied saying to use
the dispose method of the WebResponse, but that has been taken out of the
latest version. Is there a way to make the application to disconnect after
the connection and call to the website has been made? The code is
extrememly simple, create the webrequest, create a webresponse, close the
webresponse, and set the webrequest and webresponse to nothing in the timer
elapsed event. The event is called every 2 seconds, and runs well except it
continues to grow. Sometimes it will shrink slightly but still grow. I
updated the .NET to version 1.1 SP 1. I then added GC.Collect, but if I
recall correctly, GC.Collect does not release the memory back to the server,
and only releases it back to the program. Thanks.
Aug 25 '05 #1
0 1384

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Thomas Baier | last post by:
Hi there, I'v got a little program generating coincidental lists. It crashes with memory access failure, but not always at the same time. If I start the programm using valgrind it always...
5
by: meyousikmann | last post by:
I am having a little trouble with dynamic memory allocation. I am trying to read a text file and put the contents into a dynamic array. I know I can use vectors to make this easier, but it has to...
13
by: Jason Manfield | last post by:
For some URLs (e.g.http://v3.espacenet.com/origdoc?DB=EPODOC&IDX=WO2005028634&F=0&QPN=WO2005028634), the content length for the HttpWebResponse I get with request.GetResponse in empty. The...
2
by: Brent | last post by:
I'm having odd problems with the HttpWebResponse class. Some servers are quite speedy, while others don't seem to want to talk to my code. Consider the following pages*: ...
15
by: Snedker | last post by:
I'm using (HttpWebRequest and HttpWebResponse to check for updates. But how do I determine the size of the file before download? What I have in mind is a status text like "You have downloaded...
0
by: Randy Chow | last post by:
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...
2
by: STEVE.KING | last post by:
Greetings: I need to download an executable and some other binary files (a C++ DLL) from a virtual directory in my WinForms application. No-Touch Deployment manages my .NET code fine but...
2
by: Mike | last post by:
Hi, I am new to C and having problems with the following program. Basically I am trying to read some files, loading data structures into memory for latter searching. I am trying to use structres...
12
by: David Given | last post by:
I have a situation where I need to be able to allocate chunks on unmapped virtual memory. Because the memory I'm allocating isn't mapped, I can't use a normal memory allocator, as most of them...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.