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

Session management

Hello,

I'm coding a web application using ASP.NET 2.0 with forms
authentication.

I don't want the same user to log-in twice.
I need to detect whether the user is trying to log-in while another
session for that user is still active.

Is there a way I can prevent this?

Thanks.
May 11 '06 #1
4 1386
Arturo you can use session for that.
and check the session if it already exist..or something related.
Patrick
"Arturo Buonanni" <le*********************************@gmail.com> wrote in
message news:e5********************************@4ax.com...
Hello,

I'm coding a web application using ASP.NET 2.0 with forms
authentication.

I don't want the same user to log-in twice.
I need to detect whether the user is trying to log-in while another
session for that user is still active.

Is there a way I can prevent this?

Thanks.

May 11 '06 #2
On Thu, 11 May 2006 21:53:10 +1000, "Patrick.O.Ige"
<na********@hotmail.com> wrote:

I know about session, the thing I don't know is how to enumerate
active sessions to look for an already logged-in user.
Arturo you can use session for that.
and check the session if it already exist..or something related.
Patrick
"Arturo Buonanni" <le*********************************@gmail.com> wrote in
message news:e5********************************@4ax.com...
Hello,

I'm coding a web application using ASP.NET 2.0 with forms
authentication.

I don't want the same user to log-in twice.
I need to detect whether the user is trying to log-in while another
session for that user is still active.

Is there a way I can prevent this?

Thanks.

May 11 '06 #3
> Hello,

I'm coding a web application using ASP.NET 2.0 with forms
authentication.

I don't want the same user to log-in twice.
I need to detect whether the user is trying to log-in while another
session for that user is still active.

Is there a way I can prevent this?

Thanks.


You will need to remember all logins in Application scope. Plus a
Session_End handler that removes the current user from that list
(and also remove that user on logout). Check that list after the
succesful password check.

One problem that's inherent to this: when the user closes his browser
without logging out, he can't log back in until that original
session expires in 20 minutes or so. Be sure to mention that along
with the "you can't login twice" message.

Hans Kesting
May 12 '06 #4
On Fri, 12 May 2006 10:11:41 +0200, Hans Kesting
<ne***********@spamgourmet.com> wrote:

Thanks all for your replies.

So I've to manage the list of "active" session with some custom code
by myself. No list of active sessions available it seems.
Hello,

I'm coding a web application using ASP.NET 2.0 with forms
authentication.

I don't want the same user to log-in twice.
I need to detect whether the user is trying to log-in while another
session for that user is still active.

Is there a way I can prevent this?

Thanks.


You will need to remember all logins in Application scope. Plus a
Session_End handler that removes the current user from that list
(and also remove that user on logout). Check that list after the
succesful password check.

One problem that's inherent to this: when the user closes his browser
without logging out, he can't log back in until that original
session expires in 20 minutes or so. Be sure to mention that along
with the "you can't login twice" message.

Hans Kesting

May 12 '06 #5

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

Similar topics

27
by: mrbog | last post by:
Tell me if my assertion is wrong here: The only way to prevent session hijacking is to NEVER store authentication information (such as name/password) in the session. Well, to never authenticate...
3
by: Erik Johnson | last post by:
There are a lot of things about PHP I was not too keen on and hence why my company is primarily doing Python these days, but one thing I was quite impressed with was the ease with which it provided...
5
by: Abhilash.k.m | last post by:
This is regarding the session management using Out of proc session management(SQL SERVER). Among the samples below which one is better to set the session? 1. There are 20 session...
2
by: John A Grandy | last post by:
for high traffic public websites , what are the proven options for session-state storage & management ? is an out-of-process state-server generally preferred over a sql-server ? what are the...
13
by: James Hunter Ross | last post by:
We love the ASP.NET "Session" concept and make good use of it. But, getting close to deployment we find we lose sessions far too often, probably due to application restarts, etc. We hope to...
18
by: BillE | last post by:
When a user opens a new IE browser window using File-New-Window the integrity of an application which relies on session state is COMPLETELY undermined. Anyone who overlooks the fact that...
5
by: rug | last post by:
Hello, I want to use a MySQL Heap table (server load isn't an issue) for session management considering that I use a shared server and don't want anyone who has access to /tmp to be able to read...
2
by: =?Utf-8?B?YW5vb3A=?= | last post by:
Hello, I am developing a Simple ASP Application with a Login page. I want to know how session ID can be generated after User has authenticated instead of generation along with the Login page...
5
by: knyghtfyre | last post by:
Hello, My company is developing a rather large application with .NET 2.0. We are expanding to a server farm and are in the process of converting our application to use an out-of-process session...
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...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
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,...
0
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...
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,...

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.