How can i user the slidingexpiry in web.config to autologout ? RRS feed

  • Question

  • User1253338400 posted

    Hi ,

    I have set the configuration in the web.config file as follows

    <authentication mode="Forms">
    <forms defaultUrl="~/Default.aspx"
    timeout="2" />

    I just leave the web app sitting there and do not interact with it . I would expect after 2mins I would be redirected to the login.aspx page , but it doesnt redirect.

    Is there anything I am missing ?


    Friday, February 3, 2017 2:43 AM


  • User-2057865890 posted

    Hi Robby32,

    A user session is consider has a time between the first request and the last one, allowed between requests before the session-state provider terminates the session.

    HTTP is a stateless protocol. This means that a Web server treats each HTTP request for a page as an independent request. The server retains no knowledge of variable values that were used during previous requests. ASP.NET session state identifies requests from the same browser during a limited time window as a session, and provides a way to persist variable values for the duration of that session.

    reference: https://msdn.microsoft.com/en-us/library/ms178581.aspx

    Best Regards,


    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Monday, February 6, 2017 3:00 AM

All replies