title: Server process continues after Browser tab is closed
body: <p>I have an ASPX page which when is submitted into a new tab starts a server side process. Sometimes the process takes too long and a user closes the tab the page is running in. However, the process continues running and that creates a big problem. My question is why the process continues running and how can I kill it when the tab is closed. I do have a code in the code behind where I can kill the process, I just can't find a way of executing it. Please, help. Release is coming.
  Closing Browser actually help.</p>
  <p>Thanks</p>
  <p>code to detect tab closing event:</p>
  <pre><code>window.addEventListener('beforeunload', function (e) {
              e.preventDefault(); 
              e.returnValue = '';
              ... execute server code
          });
  </code></pre>
  <p>The event is not detected.</p>