Automatically redirect to login screen when session expires

3 posts, 0 answers
  1. Michael
    Michael avatar
    21 posts
    Member since:
    Aug 2008

    Posted 01 Oct 2016 Link to this post

    What is a good approach to prompting the user 1 minute before the ASP.NET session expires, and then automatically redirecting the user to the login screen?  Does anyone have a code example? 



  2. Marin Bratanov
    Marin Bratanov avatar
    4656 posts

    Posted 04 Oct 2016 Link to this post

    Hi Michael,

    The followign demo shows one approach you can take: The demo description section explains the core functionality and can help you get it easily into you project without the eye candy of the demo, as most of the code you will see there relates to timers and UX. The key thing is to:

    • update the notification when the session is renewed (usually by adding the update panel)
    • set the ShowInterval of the notification to make it pop-up a bit before the session expires.

    You can, of course, do this with simple setTimeout or setInterval calls without RadNotification and its events.


    Marin Bratanov
    Telerik by Progress
    Do you need help with upgrading your ASP.NET AJAX, WPF or WinForms projects? Check the Telerik API Analyzer and share your thoughts.
  3. Michael
    Michael avatar
    21 posts
    Member since:
    Aug 2008

    Posted 04 Oct 2016 in reply to Marin Bratanov Link to this post

    Super helpful.  Thank you!
Back to Top