title: Keep a WCF Service alive under IIS
body: <p>i have thoroughly searched the internet (most of the links sent me to stackoverflow ;)) to try to come up with a solution how to keep a WCF Service alive under IIS (7.5).</p>
  
  <p>Many of the responses here were suggesting to write an application that will periodically send dummy requests to the WCF service in order to keep it alive.</p>
  
  <p>My question is:
  what if I create a thread in the WCF which will start when a service is first called (in a static constructor) that will periodically consume the WCF itself?</p>
  
  <p>I mean for example in c#:</p>
  
  <pre><code>while (true)
  {
       WebClient client = new WebClient();
       string returnString = client.DownloadString("http://...");
       Thread.Sleep(1000 * 5);
  }
  </code></pre>
  
  <p>assuming that "http://..." is an URI to a provided WebMethod which for example returns some integer.</p>
  
  <p>Would that work?</p>
  
  <p>Basically I need some kind of web service (not particulary a WCF but not a Windows Service) that is running on a server that performs some operations and updates something in a SQL Server database. So if the described approach will not work, what might be the best way to achieve this?</p>