Solved

Session State Asp Temp Session db

Posted on 2011-03-10
4
433 Views
Last Modified: 2013-11-08
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
Comment
Question by:ckrafthofer
  • 2
  • 2
4 Comments
 
LVL 17

Accepted Solution

by:
Jesse Houwing earned 250 total points
ID: 35107694
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
 

Author Comment

by:ckrafthofer
ID: 35112001
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
 
LVL 17

Expert Comment

by:Jesse Houwing
ID: 35112016
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
 

Author Closing Comment

by:ckrafthofer
ID: 35132736
His additional information was also accurate..about global.asax
0

Featured Post

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In my previous two articles we discussed Binary Serialization (http://www.experts-exchange.com/A_4362.html) and XML Serialization (http://www.experts-exchange.com/A_4425.html). In this article we will try to know more about SOAP (Simple Object Acces…
For most people, the WrapPanel seems like a magic when they switch from WinForms to WPF. Most of us will think that the code that is used to write a control like that would be difficult. However, most of the work is done by the WPF engine, and the W…
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…
Established in 1997, Technology Architects has become one of the most reputable technology solutions companies in the country. TA have been providing businesses with cost effective state-of-the-art solutions and unparalleled service that is designed…

810 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question