Session ID's - Are these guaranteed unique

B

Ben Fidge

Are IIS session ID's guaranteed to be unique forever, like GUID's. Ie, would
it be safe to assume that a session ID is not ever going to be used again or
recycled? I want to track user activity on a web-site by storing the session
id and activity in a Sql Server database. Oviously if a session Id is used
more than once over a given time period, then the reporting is going to be
inaccurate.

Ben
 
J

Juan T. Llibre

It's guaranteed to be unique, as long as the server is not rebooted.

If the server is rebooted, there's a microscopically
small chance that the same Session ID will be used.

There's an algorithm which changes the Session ID
enumeration sequence with every bootup.

In practice, it's almost assured that the Session IDs
are unique, even across bootups.




Juan T. Llibre
ASP.NET MVP
ASP.NET FAQ : http://asp.net.do/faq/
==========================
 

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

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top