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 4114558
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T22:28:13+00:00 2026-05-20T22:28:13+00:00

I am trying to find out how to destroy a ASP.NET session when the

  • 0

I am trying to find out how to destroy a ASP.NET session when the user navigates away from my site.I am using Global.ascx application file and use session_end event .Its working fine when i click logout button. But when i close browser directly its not using Global file after 20 minitues. i used in web.conig file as <sessionState mode="InProc" timeout="20"></sessionState>

Please help me

Augustine

  • 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-20T22:28:14+00:00Added an answer on May 20, 2026 at 10:28 pm

    Session timeout defines when some session would be destroyed after some idle time.

    If you want more control over sessions, you would need to use SQLServer mode, State Server mode, or a custom one taylored yourself.

    I mean that, because, for example, SQLServer mode stores sessions in a standard SQL Server table, so, you can implement some SQL Server job, or schedule some task in Windows or in some Windows Service, so you can clean up sessions depending on your needs.

    By the way, maybe you need to know that if you’re using InProc, your sessions can be destroyed because IIS recycled application pool, or server got entirely restarted. And this isn’t ending sessions, so the appropiate event and handler won’t work in this scenario.

    I repeat, if you need a better session management mode like ones I suggested you.


    EDIT:

    Check this page:
    http://aspalliance.com/520_Detecting_ASPNET_Session_Timeouts.2

    You’ll learn how to handle session timeouts better, since Session_End isn’t called when a session expires, but when you call “Session.Abandon”.

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

Sidebar

Related Questions

I am trying to find out how to use usercontrols in asp.net mvc. I
I'm trying to find out how much memory my own .Net server process is
I'm trying to find out whether I should be using business critical logic in
I am trying to find out how to upload a file from a web
I am trying to find out how much memory my application is consuming from
Trying to find out what permissions user '_www' has on my OS X server.
I am trying find out how to redirect all traffic on a website from
I'm trying find out where/when exactly request.user becomes an AnonymousUser. I've been searching through
Trying to find out how to build a private cloud using WSO2 Stratos. I
Been trying to find out what is the bookmark id the user clicked on...

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.