title: MVC 4 Application with Windows Authentication, Redirect when session ends
body: <p>I currently have a MVC 4 Application that uses windows authentication. I would like to be able to redirect the browser to a <code>Timeout</code> view when the session ends. From my understanding Session_End is not the best place to do this because a session could end on its own without a request coming through and since no request means no response. Response.Redirect won't work. </p>
  
  <p>I have tried using the <code>OnActionExecuting</code> method and this works great for <strong>NON-AJAX</strong> calls. I would like to be able to redirect the user to my page without modifying my existing ajax calls  to check if the session is expired prior to the call since the application size is fairly large and maintaining this for future development is not feasible as well. </p>
  
  <p>Is there a way to use this method and check for ajax calls? Instead I would like the method (server) to simply redirect the browser if possible. </p>
  
  <p>Any suggestions would be greatly appreciated. And yes I have been Googling quite some time for a valid solution :).</p>
  
  <p>Thanks</p>