473,321 Members | 1,622 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,321 software developers and data experts.

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 1744
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****@microsoft.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********@newsgroup.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
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...
2
by: Maik | last post by:
I Need a popup-killer script
4
by: JZ | last post by:
http://www.djangoproject.com/ -- JZ
16
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...
8
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,...
10
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...
14
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
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: ...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

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.