Session Killer

R

Rory Becker

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?
 
H

Hans Kesting

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
 
R

Rory Becker

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)
 
S

Steven Cheng [MSFT]

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:
(e-mail address removed).

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

==================================================
This posting is provided "AS IS" with no warranties, and confers no
rights.--------------------
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,994
Messages
2,570,223
Members
46,813
Latest member
lawrwtwinkle111

Latest Threads

Top