Session ID

  • Thread starter Peter Morris [Droopy eyes software]
  • Start date
P

Peter Morris [Droopy eyes software]

Does anyone know how ASP .net creates session IDs? I heard ASP classic used
to use a GUID but those were too predictable and made it easy for people to
guess the next ID in the sequence, and that ASP .net uses a newer technique
instead.

I'd like to generate a unique ID for a "ticket" but I don't want it to be
predictable :)

Pete
 
G

Guest

Try using

Guid.NewGuid().ToString()

That's unique enough so that you will never see the same one again in your
lifetime.

"Once you get to 100, you have it made. Very few people die past that age"
-- George Burns
 
C

Cowboy \(Gregory A. Beamer\)

GUIDs are predictable ... once you now the exact time they were created and
the MAC address of the computer and a few other choice bits, like the
algorithm used. A GUID as a session ID is not easily broken down and faked,
so I would not worry about using a GUID.

As for the algorithm used, I am not sure. I would say reflect the
assemblies, but I am sure this is deep down in the COM bits of the system.

--
Gregory A. Beamer

*************************************************
Think Outside the Box!
*************************************************
 
P

Peter Morris [Droopy eyes software]

Hi

I read in an ASP .net book though that ASP .net uses a different technique
for generating the session ID. Once you are assigned a session ID it was
apparently easy in ASP to guess other session IDs and this was something ASP
..net addressed by altering the Guid in some way (MD5 hash or something
maybe).


Pete
 

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,777
Messages
2,569,604
Members
45,226
Latest member
KristanTal

Latest Threads

Top