Interviews - C# Corner

Rajesh Gami
How to kill a user session?
By Rajesh Gami in .NET Standard onFeb 26 2018
  • Rajesh Gami
    Feb, 2018 26

    When a user logs into the website, it’s a good practice to create a new session to track the user activities. So, meantime we need to handle log out scenario as well. So, we will kill a user session once user logs out of the application. Below is the code snippet that can be written to kill the user session –Session.Abandon();

    • 4
  • Manisha Makade
    Mar, 2018 23

    Session.Abandon();

    • 3
  • Aniket Rana
    Apr, 2018 3

    There Are 3 ways to Destroy SessionSession.Abandon(); Session.Clear(); Session.RemoveAll();

    • 2
  • Pankaj Kumar
    Jun, 2018 19

    there are three way to use kill the session in asp.net 1. Session.Abandon(); 2. Session.Clear(); 3. Session.RemoveAll();

    • 1
  • nithin raj
    Oct, 2018 22

    Session.Abandon();

    • 0
  • Ali Ghaffari
    Jul, 2018 20

    Session.Abandon();

    • 0
  • Deepak Verma
    May, 2018 21

    You can use Session.Abandon(); or Session.Clear();

    • 0

Most Popular Companies

Most Popular Job Functions

MOST LIKED QUESTIONS