views:

417

answers:

0

This has been asked before, but there was no really good answer, so I wanted to get some fresh thoughts on this.

I have a website using forms authentication. I have a page that uses page methods to perform various actions. The user is idle on the page past the timeout, then performs an action that calls the page method. When the page method is trying to be called, the timeout is detected, and my return value is now the html of the login page that the request was redirected to.

I am looking for some ideas on how to gracefully handle this. My solution so far has been to throw in a setTimeout js call that automatically redirects to the login page after the timeout period has elapsed. I guess this is ok, but I wanted to see if anyone else had some ideas.