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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T20:00:22+00:00 2026-05-15T20:00:22+00:00

I been using Session.clear() and I noticed in firecookie that the session still exists.

  • 0

I been using Session.clear() and I noticed in firecookie that the session still exists. So I started to google around and found there are 4 ways to remove a session

Session.Remove(strSessionName);      Remove an Item from Session State Collection
Session.RemoveAll()     Remove all items from session collection 
Session.Clear()     Remove all items from session collection  Note: There is no difference between Clear and RemoveAll. RemoveAll() calls Clear(), internally.
Session.Abandon()   Cancels the Current Session

Now clear and remove seem to do the same thing but which one should you be using like why use remove() over abandon over clear.

Like if you use session.Abandon it kills the current session. Where clear() removes the values.

Why would you only want to keep the session around with no values in it? Why not just kill it completely?

  • 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-15T20:00:22+00:00Added an answer on May 15, 2026 at 8:00 pm

    Session.Abandon() fires the Session_End event in your global.asax file, while Session.Clear() does not.

    Imagine a scenario where you store a user’s session start times and end time for auditing purposes – you may want to occasionally clear their session (updating profile settings for example), without triggering a Session_End event.

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

Sidebar

Related Questions

I'm pretty basic with .net But basically I've been told that to have session
I've just started using Dapper for a project, having mostly used ORMs like NHibernate
i am having a problem with the way that i am trying to delete
I have a page that executes a long process, parsing over 6 million rows
Am using WAMP server for PHP development. I have created a cookie in my
I have methodically been working thru the Agile Web Development with Rails book. No
I am using forms authentication, and have a timeout of 30 minutes. What I
I've been following the Summer of NHibernate series. So far so good, everything is
My experience with the SSL/TLS protocol and then OpenSSL library is very limited. Essentially
I am trying to figure out where the timed-logout function of Spring's light security

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.