title: Azure Redis - how to simulate session_end event in ASP.NET app when mode=Custom?
body: <p>The organisation I am working with uses Azure Redis to store session information for its ASP.NET site, which is new ground for me (no experience in this whatsoever).</p>
  <p>I need to fire some code when a session ends (either times out, is abandoned etc) and I read that if you have session state saved InProc Session_End will fire, but our org uses the Custom setting for session state.  Like this:</p>
  <pre><code>&lt;sessionState mode=&quot;InProc&quot; customProvider=&quot;RedisSessionStateStore&quot; stateConnectionString=&quot;tcpip=xxxx&quot; sqlConnectionString=&quot;xxxx&quot; cookieless=&quot;false&quot; timeout=&quot;1000&quot;&gt;
        &lt;providers&gt; 
          &lt;add name=&quot;RedisSessionStateStore&quot; type=&quot;Microsoft.Web.Redis.RedisSessionStateProvider&quot; connectionString=&quot;xxx&quot; applicationName=&quot;xxxx&quot; retryTimeoutInMilliseconds=&quot;1000&quot; ssl=&quot;false&quot; /&gt;
        &lt;/providers&gt;
  &lt;/sessionState&gt;
  </code></pre>
  <p>It's my understanding that the Session_End event won't fire in this case.  Other than doing some sort of scheduled job trying to find all the abandoned sessions, is there any way I can capture Session_End event?</p>