views:

1540

answers:

6

Is it 32 bit, or 64 bit or 128 bit or bigger?

A: 

Am not sure what you are looking for but basically the SessionID is a GUID

Issa Qandil
This is incorrect. See john's answer.
Richard Szalay
A: 

Because it's generated as a System.Guid Valuetype, it's a 128-bit integer, which is 16 bytes.

Moayad Mardini
This is incorrect. AFAIK, GUIDs were used in ASP Classic but dropped in ASP.Net because the GUID generation was too predictable and that resulted in a security flaw.
kervin
A: 

I would go with 88 bytes. If you look at the ASP.NET state database, that is how it is defined.

+7  A: 

It's neither int nor guid; from the MSDN help file...

The ASP.NET session identifier is a randomly generated number encoded into a 24-character string consisting of lowercase characters from a to z and numbers from 0 to 5.

john
A: 

I'm seeing different things that I cannot explain and hope someone can help. I have set up SQL Server Session State and have my Web site creating its values in the ASPStateTempSessions table.

The issue I am seeing is that the value of the SessionID column is 32 characters long, whereas the value in Session.SessionID is only 24 characters long. The first 24 characters between the two match, so why does the SQL table have an additional 8 characters?

Mark
A: 

The reason for the extra 8 characters in the database vs what you get in code is the application id. In the database the session is appended with the tempApplicationID from ASPStateTempApplications table. This is why you get 24 characters in code, and 32 in the db.

LTMOD