title: Implementing a custom callback in a web service
body: <p>I am using web services - not WCF - hosted in an iis web application written in C#/asp.net. I also have a C# winform Desktop application that had originally polled a web method to check for any messages on the server. I found the memory on the client shot up.  So, instead of polling this web method I invoke it once, the web method goes into a loop checking for messages. As soon as it finds a message(s) for this client it breaks out of the loop and returns the message(s) to the client. The client in turn will process the message(s) and then re-invoke the same web method waiting for the next message(s).</p>
  
  <p>I run this and the memory on the client desktop and the memory on the web server remain low.  I really have 2 questions here.</p>
  
  <p>1). Will the memory escalate on the server when more clients invoke the same web method?
  2). Should I avoid this way of doing things?</p>
  
  <p>I know there are callbacks available using WCF and I know I can create a hub using Signal R. what I would like to know is there anything wrong/different to how I am doing it and/or is there a better way of doing it?</p>
  
  <p>Many Thanks.</p>