Automatic logout after 5minutes RRS feed

  • Question

  • User-1226353825 posted


    i want to automatically get logged out after 5minutes......with the condition ....if user is idle for 5minutes......suppose user goes out and comes back in 3minutes and scrolls his mouse the page should logout after 2 more minutes.....oly if it is idle

    Tuesday, January 25, 2011 12:11 AM


All replies

  • User-1129879462 posted

    Set session timeout to 5 minutes (default is 20 minutes) and do the necessary clean-up work in global.asax's session_onend event handler 

    Tuesday, January 25, 2011 12:48 AM
  • User-1226353825 posted

    how to set and in global.asax what i have to place

    Tuesday, January 25, 2011 12:52 AM
  • User1666665689 posted

    Dear Friend,

    Check with the URL's below



    This will help you out on "How to detect the Session TimeOut and redirect the user to the desired page".

    Thanks and Regards,


    Tuesday, January 25, 2011 12:58 AM
  • User590655761 posted

    You can write this code in your web.config file ......

    <sessionState timeout="20"></sessionState>
    Tuesday, January 25, 2011 1:45 AM
  • User-448512826 posted

    add following code in your <web.config> section in your config file

    <authentication mode="Forms">
    			<forms name="AUTH" loginUrl="~/Login.aspx" protection="All" timeout="30" slidingExpiration="true" path="/" cookieless="UseCookies" requireSSL="false"/>



    Tuesday, January 25, 2011 6:28 AM
  • User-481631678 posted

    See this article it will guide you about different places through which you can define your session timeout:-


    Tuesday, January 25, 2011 6:29 AM
  • User-1226353825 posted

    well i gave this 

    <authentication mode="Forms">  
                <forms name="AUTH" loginUrl="~/Login.aspx" protection="All" timeout="1" slidingExpiration="true" path="/" cookieless="UseCookies" requireSSL="false"/>  
    and waited for one minute
    it is not loging out 

    Tuesday, January 25, 2011 7:52 AM
  • User-660870441 posted

    Hi,<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /><o:p></o:p>

    You want to automatically redirect to login page after a period or inactivity, right?<o:p></o:p>

    If so, please check Redirect to Login page on session expiration (ASP.NET) to see if it will be helpful. Or do search with "asp.net auto redirect login".<o:p></o:p>

    Hope this helps. 

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Wednesday, January 26, 2011 3:38 AM