title: Page is not redirecting to login page after session expire using AJAX
body: <p>In my MVC project most of the calls to server are done using Ajax. It works smoothly until the session expires. I have added custom attribute to redirect the page to login page once the session gets expired. But when the call is from AJAX then it is not redirecting to login page.</p>
  
  <p>I have gone through many threads regarding this which has basically suggested to use <code>OnActionExecuted</code> method of <code>ActionFilterAttribute</code> class, but while doing so i am only getting the type <code>HttpActionExecutedContext</code> instead of type <code>ActionExecutingContext</code>.</p>
  
  <p>Here's my code: </p>
  
  <pre><code>public class SessionExpired : ActionFilterAttribute
          {
              public override void OnActionExecuted(HttpActionExecutedContext actionExecutedContext)
              {
                  //My Code to handle the session event
                  base.OnActionExecuted(actionExecutedContext);
              }
          }
  </code></pre>
  
  <p>Thanks in advance.</p>