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

  • SEARCH
  • Home
  • 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 4556532
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T17:22:47+00:00 2026-05-21T17:22:47+00:00

I have read that asp.net session variable last by default 20 minutes of inactive

  • 0

I have read that asp.net session variable last by default 20 minutes of inactive browser.

What happens if the user logs out and immediatly logs in? Or closes the browser and restart it? The session state “dies” ?
If not- what is the alternative to make it die on evey log-out or browser closing?

Thanks

  • 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-21T17:22:47+00:00Added an answer on May 21, 2026 at 5:22 pm

    Session state relies completely on the presence of a cookie being provided by the browser for each request in the ‘session’. When the server takes receipt of the cookie on each request it then checks if the default 20 mins has passed since the last request.

    Therefore the answers to your questions:

    What happens if the user logs out and
    immediatly logs in?

    The cookie is marked as invalid by the server on logout and is assigned a brand new one when they log back in

    Or closes the browser and restart it?

    Provided the session hasn’t expired it won’t make any difference (as the browser will still send the cookie along with each request)

    make it die on evey log-out or browser
    closing?

    You can’t make a cookie ‘die’ although you can set it’s expired date to the past. There is no way you can detect the user closing their browser.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have read that TempData is backed by session in Asp.Net MVC, but only
I have read that viewstate is not there in asp.net MVC application. I am
I am new to ASP.net MVC architecture. I have read in some articles that
I have read here that any ASP.NET validator has a property called: isvalid .
I have read that the viewstate in asp.net stores the values of control properties
I have a WCF web service that uses ASP.NET session state. WCF sets a
ASP.NET does not allow concurrent requests for the same session; meaning that a user
I have a reporting module (C# asp.net) that uses dynamic controls to represent the
I have an ASP.NET site that I am maintaining. Currently it has code that
We have an ASP.Net application that provides administrators to work with and perform operations

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.