title: WCF REST Service goes to sleep after inactivity
body: <p>I've got a WCF REST service that is declared in a regular ASP.NET web project:</p>
  
  <pre><code>[ServiceContract]
  [AspNetCompatibilityRequirements(RequirementsMode = AspNetCompatibilityRequirementsMode.Allowed)]
  [ServiceBehavior(InstanceContextMode = InstanceContextMode.Single, IncludeExceptionDetailInFaults = true)]
  public class BasicApp
  </code></pre>
  
  <p>I'm using it as a service layer for an iPhone app I'm building, so I'm requesting it using the excellent ASIHTTPRequest library.</p>
  
  <p>The service itself is working just fine, but when it has been idle for approximately 10 minutes the service seems to go to sleep, which in the end gives me timeout issues on the iPhone.</p>
  
  <p>If I request the service through the browser it's the same, but after 30 seconds or so the service "wakes up" and then all consecutive requests are really fast. I know I can up the timeout limit on the iPhone, but that doesn't really seem to work very well for a handheld device.</p>
  
  <p>I'm guessing it's a configuration issue. The service is hosted on Win2008R2 with IIS 7.5</p>
  
  <p>The IIS website is configured with it's own AppPool running .NET framework v4 with Integrated Pipeline.</p>
  
  <p>Anyone has an idea how to resolve this?</p>