473,394 Members | 1,726 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,394 software developers and data experts.

A way to kill Session user(only one session), solutions...

Hello,

I 'would like to build a system (based on database, not SqlServer but MySQL)
to permit only one session per user. I'm using a form athentication.

My Solution :
---------------

When a connection is established by a user, I realize an insert in a Table,
named tbLogin with many informations such as idUser, SessionId, Guid, Date,
Time..

So, if an another user try a connexion with same Login And Password, ...he
can't. The record of a connection exist in my table tbLogin and the access
is refused.
This solution is fine so long as users use the button Exit of my Application
Web.
By this way I can delete the line in the table tbLogin and allow another
access. To identify the right line (unique), i use the SessionID delivred by
the framework.

My problem
---------------

But the problem is when the user don't use this button or let the session to
expire....
How to kill this line in my table after a certain time and allow a new
connection.
I'have an idea, ...to allow an access in force. That is to say a connection
which first delete this line in Tblogin and after allow access and insert a
new line.
But in this case I'd like to remove all the session variable bind to the
specific SessionID before the deleting. That is to say, kill the session of
the user. By this way i'm sure that there is only one session by usser.
So, how to access or remove the session variables bind to a specific User
when you know this sessionID. Is it possible ? A kind of kill session like
in Oracle Database (alter kill session ...)
Or perhaps do you know a best solution ?
Thanks for your help and your time.

fabrice
Nov 19 '05 #1
2 8970
"Fabrice" <em******@spam-infonie.fr> wrote in
news:#n**************@TK2MSFTNGP11.phx.gbl:
But the problem is when the user don't use this button or let the
session to expire....
How to kill this line in my table after a certain time and allow a new
connection.
I'have an idea, ...to allow an access in force. That is to say a
connection which first delete this line in Tblogin and after allow
access and insert a new line.
But in this case I'd like to remove all the session variable bind to
the specific SessionID before the deleting. That is to say, kill the
session of the user. By this way i'm sure that there is only one
session by usser.


I don't think you can kill other sessions...

Well perhaps if you were using SQL Server as a state server you can... but
if it's inprocess, I don't believe this is possible.

A better solution would be to ingore the session (let it expire naturally),
and just your database to track the status of the users.

--
Lucas Tam (RE********@rogers.com)
Please delete "REMOVE" from the e-mail address when replying.

Newmarket Volvo Sucks! http://newmarketvolvo.tripod.com
Nov 19 '05 #2
Handle the Session_End routine, and in it, delete the database row for the
session that is ending. This event will fire when the session idle timeout
is reached.

"Fabrice" <em******@spam-infonie.fr> wrote in message
news:%2****************@TK2MSFTNGP11.phx.gbl...
Hello,

I 'would like to build a system (based on database, not SqlServer but
MySQL) to permit only one session per user. I'm using a form
athentication.

My Solution :
---------------

When a connection is established by a user, I realize an insert in a
Table, named tbLogin with many informations such as idUser, SessionId,
Guid, Date, Time..

So, if an another user try a connexion with same Login And Password, ...he
can't. The record of a connection exist in my table tbLogin and the access
is refused.
This solution is fine so long as users use the button Exit of my
Application Web.
By this way I can delete the line in the table tbLogin and allow another
access. To identify the right line (unique), i use the SessionID delivred
by the framework.

My problem
---------------

But the problem is when the user don't use this button or let the session
to expire....
How to kill this line in my table after a certain time and allow a new
connection.
I'have an idea, ...to allow an access in force. That is to say a
connection which first delete this line in Tblogin and after allow access
and insert a new line.
But in this case I'd like to remove all the session variable bind to the
specific SessionID before the deleting. That is to say, kill the session
of the user. By this way i'm sure that there is only one session by usser.
So, how to access or remove the session variables bind to a specific User
when you know this sessionID. Is it possible ? A kind of kill session like
in Oracle Database (alter kill session ...)
Or perhaps do you know a best solution ?
Thanks for your help and your time.

fabrice

Nov 19 '05 #3

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

Similar topics

2
by: marslee | last post by:
I want to prevent non-registered users to view a page in my website, For example, when a non-registered user clicks the history page, the website site refuses to go there since he is not...
17
by: Alphonse Giambrone | last post by:
I am building a web app for users to add/edit data. They may add/edit several records during a session. When they are done (not necessarily immediately, could be 10 or more minutes later), I need...
5
by: tshad | last post by:
If I am using FormsAuthentication, is there a way to check who is logged in? I want to be able to check at any particular time, not just how many people are logged in, but who they are. One...
3
by: ad | last post by:
In some condition, like another user log in with the some ID, I want to close a user's session. How can we terminate a user's session with program?
3
by: JJ_377 | last post by:
What is the difference between Session.Abandon and Session.Clear? Thank you.
6
by: NH | last post by:
How can I warn a user that their session has expired when they click on a button etc?
1
by: Johndoe | last post by:
Hi, I'm building a Web page with a Flash component that post some content to a handler (ashx file). There is a known bug with Flash 8 running on Firefox, whereby Flash will not send cookies (I...
2
by: George Lake | last post by:
Hi, Is there a way to kill a Terminal Server session from vb.net? I have to constantlly access our servers to reset ureser that get hung. I would like to have a web interfave that I can access via...
0
by: =?Utf-8?B?QmxhZGltaXI=?= | last post by:
I need to know, if is possible assign one USB port to user's session Windows XP. I have this question because need restrict some user's account for use webcam. If this is possible, how I do it? ...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
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...
0
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...

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.