title: How to establish 2-way communication between a web server and a site server?
body: <p>I am planning a SaaS system, to be written in C#, ASP.NET using WCF that has two separate components:</p>
  
  <ol>
  <li>On a static IP web server in the cloud will be a web app, common to all clients.</li>
  <li>Inside each client's office will be another app, installed on a server with IIS.</li>
  </ol>
  
  <p>The site app will obviously be able to connect to the web services published on the web site.  But here's the rub - I also want the web app to be able to initiate a connection to the site app... and the on-site server may not necessarily have a static IP.  I can't control this, because we may have hundreds of clients at some point in the future, and we cannot limit our saleability by insisting that the customer has a server with fixed IP.</p>
  
  <p>So, how to do this?</p>
  
  <p>I could have the site apps "checking in" with the web every minute or so, to give the web app the possibility of responding with a "while you're here, please do <em>x,y,z...</em>" but that seems very inelegant.  Also, if we're talking about hundreds of clients, I don't want to be bombarding my web server with all these "hi there!" messages if they're not actually required.</p>
  
  <p>Is there a better way?</p>