Click here to Skip to main content
12,289,383 members (33,159 online)
Rate this:
Please Sign up or sign in to vote.
See more: ASP.NET SQL SQL-Server
I want to develop a website in ASP.NET Web Forms. In this website i want to connect any two online users randomly for a specified time (suppose 30 seconds).

I am thinking to add the users into a temp table(to keep a track of online users) and assign them a random number as soon as they log in and delete them from the temp table on log out.


1.I have no idea how to remove the user from the table on session expire or on browser close.

2.I am not sure how to connect two online users randomly (like in omegle). When User A and User C are connected User B should not be able to connect to "User A and User C"
Posted 8-Jan-13 21:53pm
Edited 8-Jan-13 21:54pm

1 solution

Rate this: bad
Please Sign up or sign in to vote.

Solution 1

1 - you can't. the most you can do, is use a timeout based on a time stamp

2 - just mark each user as already connected to someone and don't connect them to someone else. A bit field in the DB.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy | Mobile
Web02 | 2.8.160518.1 | Last Updated 9 Jan 2013
Copyright © CodeProject, 1999-2016
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100