s

B

bushi

hi everyone!
i have a web application,i want to get unique session
id for each visitor.session id should not assigned by me like:
session["s_id"]=index;
is it possible to assign a session id automatically when a client
visit my webpage?i will wait 4 any help anxiously as i got stuck at
that point.
 
G

Guest

hi everyone!
i have a web application,i want to get unique session
id for each visitor.session id should not assigned by me like:
session["s_id"]=index;
is it possible to assign a session id automatically when a client
visit my webpage?i will wait 4 any help anxiously as i got stuck at
that point.

Look at the Session.SessionID property.

and also read this article
http://support.microsoft.com/?kbid=899918
 
C

Cowboy \(Gregory A. Beamer\)

Alexey is spot on: Session.SessionID.

Why create your own session scheme, when a unique identifier is alerady
created for you by the system? Every time somebody connects, this session ID
is already generated. And, since it is a Globally Unique Identifier (GUID),
it is guaranteed to be unique. If you code your own scheme, you will have to
use GUIDs to guarantee uniqueness as well. Why re-invent the wheel?

If you have a reason you feel you need to create your own session ID, please
post what you are trying to do, from a user perspective, and you will likely
get alternatives to rewriting the ASP.NET session model.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,780
Messages
2,569,611
Members
45,273
Latest member
DamonShoem

Latest Threads

Top