• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 454
  • Last Modified:

Session State Asp Temp Session db

Q.SessionID is hashed and too lengthy for us to use as a unique identifier. How can we add or
use a short number which serves the same purpose as the sessionID?
0
ckrafthofer
Asked:
ckrafthofer
  • 2
  • 2
1 Solution
 
Jesse HouwingScrum Trainer | Microsoft MVP | ALM Ranger | ConsultantCommented:
What do you want to use this identifier for? And do you want to access it only from the database? Or also from the ASP.NET code?

It would be reasonably simple to put a numeric column in the session table with a trigger which fills it upon creation (for security purposes you want this to be a unique random number). Or, if you're never exposing this ID externally, you could use an identity column.

Something else I'd like to know is how/why the unique id in SessionId is too long for your purposes?
0
 
ckrafthoferAuthor Commented:
Well, we need smaller number in order to track the user's movement thru several sections in our website and they have their own navigational db.
0
 
Jesse HouwingScrum Trainer | Microsoft MVP | ALM Ranger | ConsultantCommented:
why can't you use the sessionid from the default asp.net db then?

If you only need to track them while the session is live and when you don't need access to it directly in the database, why not put a value in the session in the global.asax and read that?
0
 
ckrafthoferAuthor Commented:
His additional information was also accurate..about global.asax
0

Featured Post

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now