Coder Social home page Coder Social logo

Session.Cancel() about session HOT 4 CLOSED

aspnet avatar aspnet commented on May 25, 2024
Session.Cancel()

from session.

Comments (4)

Tratcher avatar Tratcher commented on May 25, 2024

What precisely would you want cancel to do? Discard the data? Delete the cookie?

from session.

hishamco avatar hishamco commented on May 25, 2024

@Tratcher i.e. destroy the session, because Session.Clear() will remove all the objects stored in a session, but the session will be destroyed when the session times out.

Have a look to https://msdn.microsoft.com/en-us/library/system.web.sessionstate.httpsessionstate.abandon%28v=vs.110%29.aspx

from session.

Tratcher avatar Tratcher commented on May 25, 2024

So you're asking for Cancel() to delete the session from storage (wherever that may be).

There is very little difference between an empty session and a non-existent session from the storage perspective. In fact, I could optimize the storage logic to ignore/discard empty sessions entirely (right here?). That would make session.Clear() equivalent to session.Cancel().

from session.

hishamco avatar hishamco commented on May 25, 2024

@Tratcher I thought that Session.Clear() removes all the objects stored in a session but not destroy the session. Thanks for your clarification

from session.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.