views:

91

answers:

2

First, I am using .net 3.5. I want to create an online chat system for my users. I have found some decent (open source) chat systems that I can use, but there are a couple features I want to add. I want the chat user to be able to see how many people are on their site and allow the chat user to select a user and begin to talk with them. The normal user may not always have an account on the site, so I can't pin-point by my user database. I have seen other applications allow you to select from a list of online users and begin a chat session with them. I am thinking I can target by the session ID, but is there a more full proof way I can achieve this?

A: 

One way to do this is to make a new table in your database, in which a user is put as soon as he logs in to the chat - even non-members can be helped this way, as they will probably need to have some alias anyway, so when they come into the chat, they either have to choose a name or get one randomly - this name can be linked to an id that only goes in the chatroom, with which you can easily start conversations to someone. It's just a general idea, rather something worked out, but I think you should be able to work from there.

Jasper
+1  A: 

You can try using HttpRequest.AnonymousID Property:

The AnonymousId property assigns a long-lived unique identifier to a non-authenticated user, which can be used to track the user or assign profile properties to that user without storing data in a Session object. By default, the AnonymousId property is tracked using a cookie.

Pavel Chuchuva
I think this will work for me!
DDiVita