title: ajax call to .ashx file
body: <p>Can someone please check why my .ashx file is not firing
  the alert is being hit fine</p>
  
  <pre><code>function setHeartbeat() {
          setInterval("heartbeat()", 20000); 
             }
  
           function heartbeat() {
               alert('ajax called');
                   $.ajax({
                       type: "GET",
                       url: "SessionHeartbeat.ashx",
                       data: null,
                       success: function (data) {
                           beatHeart(30);
                           setHeartbeat();
  
      }});
      }
  </code></pre>
  
  <p>.ashx file looks like this and is called SessionHeartbeat.ashx</p>
  
  <pre><code>public class SessionHeartbeat : IHttpHandler, IRequiresSessionState
      {
          public bool IsReusable { get { return false; } }
  
          public void ProcessRequest(HttpContext context)
          {
              context.Session["Heartbeat"] = DateTime.Now;
          }
      }
  }
  </code></pre>
  
  <p>this is my web.config</p>
  
  <pre><code>&lt;httpHandlers&gt;
      &lt;add verb="GET,HEAD" path="SessionHeartbeat.ashx" validate="false" type="SessionHeartbeat"/&gt;
  &lt;/httpHandlers&gt;
  </code></pre>