473,796 Members | 2,661 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Session Killer

Does anyone know of a good way to kill the session of a single user?

I need to locally simulate the arrival of a user at a given point in my application
and then them waiting sufficient time for session to expire.

A perfect solution would be a winform app which I scould run on my dev box
to monitor the sessions of a given app. I would use this to see when the
session is generated for the user as I log in to my app and then have a
button which would allow me to kill that session.

Any ideas?

--
Rory
Jul 4 '08 #1
3 1765
Rory Becker explained on 4-7-2008 :
Does anyone know of a good way to kill the session of a single user?

I need to locally simulate the arrival of a user at a given point in my
application and then them waiting sufficient time for session to expire.

A perfect solution would be a winform app which I scould run on my dev box to
monitor the sessions of a given app. I would use this to see when the session
is generated for the user as I log in to my app and then have a button which
would allow me to kill that session.

Any ideas?
If it is just for testing purposes on a dev machine:
- add a space at the end of some line in web.config and save this: this
will recycle the webapp, thereby killing all sessions
- just set the session timeout temporarily to 2 minutes - you can wait
for that.

As far as I know there is no way to access or kill one particular
session from the "outside".

Hans Kesting
Jul 4 '08 #2
Hello Hans,
If it is just for testing purposes on a dev machine:
- add a space at the end of some line in web.config and save this:
this
will recycle the webapp, thereby killing all sessions
- just set the session timeout temporarily to 2 minutes - you can wait
for that.
As far as I know there is no way to access or kill one particular
session from the "outside".
Thanks Hans.

This is, of course, what I should be doing.

I think I'm going to give up on Fridays. Everybody always wants a last minute
fix and then there's friday lunch (typically down the pub) followed by food
induced coma. :)

All this and I still (It's 10:53 here) have not had any coffee today.

Yeah. Fridays are not good :)

Thanks again for taking the time to point out the obvious. ( I could have
been looking at that problem for hours in my current state)

--
Rory
Jul 4 '08 #3
Hi Rory,

Yes, as Hans said, for sessionstate, ASP.NET doesn't expose interface for
us to query sessionstate of every user and we have to access session state
in that client-user's request context. BTW, is there any particular
requirment for you to clear session state for given user? For per user
specfic data (easy to control), you can consider using the Profile
properties provided in ASP.NET 2.0:

#Defining ASP.NET Profile Properties
http://msdn.microsoft.com/en-us/library/d8b58y5d.aspx

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead

Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you. Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
ms****@microsof t.com.

=============== =============== =============== =====
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscripti...ult.aspx#notif
ications.

=============== =============== =============== =====
This posting is provided "AS IS" with no warranties, and confers no
rights.--------------------
>From: Rory Becker <ro********@new sgroup.nospam>
Subject: Re: Session Killer
Hello Hans,
>If it is just for testing purposes on a dev machine:
- add a space at the end of some line in web.config and save this:
this
will recycle the webapp, thereby killing all sessions
- just set the session timeout temporarily to 2 minutes - you can wait
for that.
As far as I know there is no way to access or kill one particular
session from the "outside".

Thanks Hans.

This is, of course, what I should be doing.

I think I'm going to give up on Fridays. Everybody always wants a last
minute
>fix and then there's friday lunch (typically down the pub) followed by
food
>induced coma. :)

All this and I still (It's 10:53 here) have not had any coffee today.

Yeah. Fridays are not good :)

Thanks again for taking the time to point out the obvious. ( I could have
been looking at that problem for hours in my current state)

--
Rory
>
Jul 7 '08 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

14
3169
by: Matt | last post by:
Any progammers looking for a killer app to develop? How about a voice enabled forum? One of the most powerful, exciting, and engrossing experiences on the Internet is the Forum. The first great Internet forums were the Usenet newsgroups. Usenet is still a powerful force, but many different types of forums are also very popular (such as message boards like Vbulliten and XMBforum). I love forums. Love em love em love em. My web site...
2
1747
by: Maik | last post by:
I Need a popup-killer script
4
1554
by: JZ | last post by:
http://www.djangoproject.com/ -- JZ
16
2130
by: The Ruling Class | last post by:
With all the books and code written in Java, why are there no /killer/ applications? Can you name one Java application that is a must have? I run Suse 9.0 -- I don't see a single Java application on my OS. I can't think of a Java application that I would actually want or need? The Java Community just seems like a big, huge self-congratulatory group of
8
3180
by: Dave Wurtz | last post by:
All, I'm new to ASP development and I have a basic design question: Is it ok to store business objects to session variables or is there a better way to keep object information? For example, if a user logs onto the website, a user object is created that stores their full name, email address, street address, phone, etc. This object also has methods to do 'other' things such as validations, counters,
10
12212
by: GreggTB | last post by:
I've got an page (LOGIN.ASPX) that receives the user's login information. During the page load, it checks the credentials against a database and, if validation is successful, creates an instance of an object that stores the user's basic profile data (username, user type, associated sales region, etc.). I've been taking this user info and placing it in the Session object like so... Session = user;
14
6963
by: John | last post by:
Hi Is there a way to e-mail using outlook2002 from within vb.net without getting the nasty "An application is trying to access you outlook..." message? Thanks Regards
0
1269
by: RED | last post by:
If you market products or services online, this is a MUST have tool to success. Click here: http://tinyurl.com/2j652s How to Write Killer Email Promos that Get Results! Click here: http://tinyurl.com/2j652s ---
0
9684
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9530
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10459
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10182
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10017
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9055
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6793
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5577
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4120
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.