I am currently developing an ASP.NET application that utilizes forms authentication with a timeout interval of five minutes. Within my application, there is a button that triggers an AJAX call to a function located on the service specified in my .svc file. I am wondering how I can determine, using client-side JavaScript, when the application has timed out. Alternatively, is it possible to detect this within the global.asax file, possibly utilizing the application_beginrequest event?