sharepoint session id

jackjohnson44
jackjohnson44 used Ask the Experts™
on
I am storing some user settings for a SharePoint site in a list.  I want to persist these while the user is in an active session, but remove them when they come back.  If this was asp, I would simply store the session id and compare it to the current session id.  I don't necessarily need a session id, just a way to determine if they are a return visitor.  I don't want to have to enable session state if this will slow down the app.  How should I handle this?
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Senior Software Developer
Top Expert 2009
Commented:
If you truly need to keep them in memory then it has to be in sessions.  What user settings are you storing?

Author

Commented:
I wasn't too clear on my description.  I only need to know if a user left and came back.  If this was asp.net I could put something in the session_start code.  Is there something like that for SharePoint?  I don't need sessions or cookies.  I am just using this as an example.  I could easily write code that writes to a database a time stamp for the last page view of the user.  If the current time - last page view was greater than 20 min (just an example), I would know that the user left and came back.  Both of these examples require a lot of overhead.  I was thinking that SharePoint would have something built in that I could leverage.
Ted BouskillSenior Software Developer
Top Expert 2009

Commented:
Have you looked at the usage metrics that are built in?

Author

Commented:
No.  I don't see where you are going with that.
Ted BouskillSenior Software Developer
Top Expert 2009

Commented:
The usage metrics can show multiple visits.  I'm still not clear about why you want to detect that they left and came back.  Can you give more information?

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial