Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7541615
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T07:56:24+00:00 2026-05-30T07:56:24+00:00

In web.config, I set timeout in the sessionState to 20 minutes. According to MSDN,

  • 0

In web.config, I set timeout in the sessionState to 20 minutes. According to MSDN, this timeout specifies the number of minutes a session can be idle before it is abandoned. In IIS 7, DefaultWebSite->Session State->Cookie Settings->Time Out automatically is populated with timeout value set in web.config, which in my case is 20 minutes. Also, Application Pools->DefaultAppPool->Advanced Settings->idleTimeout, I set it to 10 minutes.

Then I made two tests:
First test: I logged in my web app at 3:45pm, idling for 10 minutes. At 3:55pm, I tried to use my app, I got kicked out. I think the idleTimeout comes in play.

Second test: I logged in my web app at 4:00pm, play with the app at 4:05pm, 4:10pm, 4:15pm and 4:20pm. I expected being kicked out at 4:20pm. But I was not. I thought the session state timeout (20min) in IIS 7 is the the maximum amount of time a user session can be active before the Web Agent challenges the user to re-authenticate. Apparently from this test, it is not. Can anyone explain that to me? Also, how could I set the timeout for above case?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-30T07:56:25+00:00Added an answer on May 30, 2026 at 7:56 am

    Session time-out is a sliding time-out that is reset for a user to the configured value each time they visit the server.

    The Application Idle time-out kicks in if there have been no requests to your application for that period of time.

    The usual scenarios is therefore:

    Time User A User B Session States
    12:00 Visits Page1 A: New Session, Time-out: 20 minutes
    12:02 Visits Page2 A: Time-out reset: 20 minutes
    12:10 Visits Page1 A: Time-out: 12 min; B: New: 20 minutes
    12:15 Visits Page2 A: Time-out: 07 min; B: Time-out: 20 min
    12:22 A: times out; B: 13 min remaining
    12:32 Application Shuts Down (Idle time reached)
    12:35 Visits Page3 A: New Session Starts

    If User A were to return to the site after 12:22 they would have a completely new session, and any values you’ve stored in there previously would be lost.

    The only way to ensure that a session persists over application restarts is to configure either a SessionState service or SQL Session States, and ensure that you’ve configured the machine.key so that’s it not AutoGenerated each time the server restarts.

    If you’re using the standard ASP.NET mechanisms for authentication, then ASP.NET will will issue two cookies to each user:

    1. Authentication Token: Controlled by the Authentication time-out setting, allows the user to be auto logged in to your site if the cookie hasn’t expired, this can be fixed or sliding, and defaults to 30 minutes, which means their authentication token can cope with a longer "idle" period than their session.
    2. Session Token: Controlled by the Session Time-out setting, allows your application to store and access per-user values during the lifetime of their visit.

    Both of those cookies are encrypted using the MachineKey – so if your application recycles and generates a new key neither of those tokens can be decrypted, requiring the user to log in and create a new session.


    Responding to comments:

    1. The 20 minute session time-out relates to items you’ve placed in the users session object (HttpSessionState) using the Session.Add(string, object) method.
    2. That depends. If you’ve correctly configured the machine.key, authentication tokens will still be valid, and if your sessions are no longer "InProc" these will also persist through application restarts and will still be readable – see notes above.
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

The session state timeout is set using this web.config element <sessionState mode=InProc cookieless=false timeout=120
In ASP.NET you can set the session timeout in several places: web.config: <authentication mode=Forms>
setting the timeout for a site vie the web.config to 60 minutes. <SessionState mode=stateServer
In ASP.NET application's web.config, I have something like this <sessionState mode=InProc cookieless=false timeout=30/> Is
How can i set default home page in asp web.config file. i have already
I want my web page to close when SessionState timeout occures. This is my
We're trying to get session state working using the following web.config line: <sessionState mode=SQLServer
i have set the session timeout to 20 minutes in IIS level and there
How can i set up web.config file to support user membership with roles for
I know one can set the session timeout. But, if the application itself has

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.