You are using ASP.NET MVC with jQuery. You make a lot of AJAX calls. You want to notify the user if they click something and the session has timed out. Does anyone have a good existing solution to this that also includes notifying the user of timeout after initiating an AJAX request?
(There are known solutions for non-AJAX ASP.NET apps that involve detecting the timeout in Global.asax and redirecting to a specific page. Redirecting the AJAX request, however, is problematic because the user either won't see it, or will see it in the wrong context.)
This is something almost every application needs so I just want to make sure I don't reinvent the wheel. Thanks!