Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Rhinorhino on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Storing SessionID on server

Status
Not open for further replies.

CoHp

Programmer
Joined
Feb 18, 2005
Messages
3
Location
DE
I´m an asp beginner trying to set up a protected sub-web with a access database. On a localhost everything works fine. After uploading to host-server the SessionID was lost after logged-in user started to view different pages and was sent back to login.asp. The host-server´s support people tell me that the application is "swapped" onto different servers according to the load on any particular time or day and that the Session cannot be held unless stored in a file or database on the server.

In order to keep the validation state, can anyone suggest what code I would need to store the SessionID (or SessionObject?) in a file or databank on the server, or where I can go to learn up on this.
All help much appreciated.
 
If they are using load balancing the process of managing user sessions becomes a little more difficult than simply calling the Session("xx") variable as the Session variable (and Application variable)is stored locally on each server and not usually shared.

Depending on the database layer architecture, you are probably best keeping a database record with this information in, though again - an access database stored locally may not get mirrored instantaneously - you would need to check with the web hosting provider how the files are mirrored, and whether the area you keep your db in is shared, or mirrored - or anything.

here is an article you may find useful


It doesn't really give you a direct answer, more of a guide - though it may spark off some ideas.
You could always resort to the cookie functionality.... if you are not keeping anything sensitive in there (i.e. security info etc).

Hope that helps.
Damian



A smile is worth a thousand kind words. So smile, it's easy! :-)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top