I have a service that I am writing that will poll a web service approx once every second to see if data is available for the client. The reason the polling frequency is so frequent is that the data get's sent to the client workstation that the service is running on and the users need to see this data in semi-real time. Currently I am using a WebClient object and running a ".DownloadString" operation. I am initializing the WebClient with a "using" statement and surrounding it all in an endless while loop. Currently the service is consuming over 30mb of memory in task manager and I need to try and keep it under 10mb due to the workstations it will be running on.
Any ideas on how to perform these web requests without the memory footprint that WebClient is giving me? I am open to any ideas. Or am I just using the WebClient wrong? Seemed pretty straight forward.
Thanks.