title: Ajax enabled wcf service using jquery POST data is not sent after a short while
body: <p>I'm using an ajax enabled wcf service with a jquery POST method which gets data for my sidebar menus.<br>
  It works great just after the page loads but if i wait a few minutes and then try to get the data i get no response. Firebug shows the request is sent from the browser however i'm not seeing a hit while in debug mode, the server doesn't even realize a request was sent.<br>
  any suggestions?<br></p>
  
  <p><strong>EDIT</strong>
  here is some relevant code<br>
  clientSide:</p>
  
  <pre><code>$.ajaxSetup({
      type: "POST",
      contentType: "application/json",
      timeout: 10000,
      cache:false,
      dataType: "json"
  
  });
  
  function getSubcategories(categoryId, onSuccess, onError) {
      var request = new Object();
      request.categoryId = categoryId;
      var jsonData = JSON.stringify(request);
      $.ajax({
          url: "/SiteService.svc/GetSubcategories",
          data: jsonData,
          success: onSuccess,
          error: onError
      });
  </code></pre>
  
  <p>ServerSide:</p>
  
  <pre><code>[ServiceContract(Namespace = "myService")]
  
      public interface ISiteService
      {
  
          [OperationContract()]
          SiteServCategory[] GetSubcategories(int categoryId);
      }
  </code></pre>
  
  <p>web.confing</p>
  
  <pre><code> &lt;system.serviceModel&gt;
  
      &lt;services&gt;
  
        &lt;service name="App_Code.Services.Website.Site.SiteService" behaviorConfiguration="DebugEnabled"&gt;
          &lt;endpoint behaviorConfiguration="SiteServiceAspNetAjaxBehavior" binding="webHttpBinding" contract="App_Code.Services.Website.Site.ISiteService"/&gt;
        &lt;/service&gt;
      &lt;/services&gt;
      &lt;behaviors&gt;
        &lt;endpointBehaviors&gt;
         &lt;behavior name="SiteServiceAspNetAjaxBehavior"&gt;
            &lt;enableWebScript/&gt;
          &lt;/behavior&gt;
        &lt;/endpointBehaviors&gt;
        &lt;serviceBehaviors&gt;
              &lt;behavior name="DebugEnabled"&gt;
  
            &lt;serviceMetadata httpGetEnabled="true"/&gt;
            &lt;serviceDebug includeExceptionDetailInFaults="true"/&gt;
          &lt;/behavior&gt;
        &lt;/serviceBehaviors&gt;
      &lt;/behaviors&gt;
      &lt;serviceHostingEnvironment aspNetCompatibilityEnabled="true" multipleSiteBindingsEnabled="true"/&gt;
    &lt;/system.serviceModel&gt;
  </code></pre>