Thanks a lot for Curt and Michael's suggestions.
Hi Robert,
Thanks for posting in the community!
From your description, you'd like to implement a custom mechanism which
used to detect whether the user has been inactive for a certain period of
time on a web app. If so, automatically redirect them to a certain login
page, yes?
As for this problem, here are my suggestions:
1. As Curt has metioned, if you need to determine whether the user should
be timeout according on the recorded time at serverside(in memory or
database). Then, you can only redirect user after the user's NEXT CLICK.
2. If you want to automaticlly reidirect user to a page, you need to use
javascript(such as window.location.href =...) or the meta tag as Michael
has mentioned. However, since the timeout state info are on serverside, I
think you need to do constant post to the serverside to check whether the
user is timeout, do you think so? But constantly posted back will make the
page looked so uncomfortable to user. I think you may use a iframe page
embeded in your web page. The iframe inner page will contantly be posted
back( you can use the meta tag Michael provided) and check the state(time
flag) in the database. And in the main page, you can use the
"window.setInterval" function to check a hidden field flag to determine
whether to redirect the user or not. How do you think of this?
Please check out the suggestions. IF you have any other ideas, please feel
free to let use know.
Regards,
Steven Cheng
Microsoft Online Support
Get Secure!
www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)
Get Preview at ASP.NET whidbey
http://msdn.microsoft.com/asp.net/whidbey/default.aspx