Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Session State Asp Temp Session db

Posted on 2011-03-10
4
Medium Priority
?
449 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
4 Comments
 
LVL 17

Accepted Solution

by:
Jesse Houwing earned 1000 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

Free Backup Tool for VMware and Hyper-V

Restore full virtual machine or individual guest files from 19 common file systems directly from the backup file. Schedule VM backups with PowerShell scripts. Set desired time, lean back and let the script to notify you via email upon completion.  

Question has a verified solution.

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

After several hours of googling I could not gather any information on this topic. There are several ways of controlling the USB port connected to any storage device. The best example of that is by changing the registry value of "HKEY_LOCAL_MACHINE\S…
A long time ago (May 2011), I have written an article showing you how to create a DLL using Visual Studio 2005 to be hosted in SQL Server 2005. That was valid at that time and it is still valid if you are still using these versions. You can still re…
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…
Want to learn how to record your desktop screen without having to use an outside camera. Click on this video and learn how to use the cool google extension called "Screencastify"! Step 1: Open a new google tab Step 2: Go to the left hand upper corn…

604 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