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 Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Loosing session between frames

Status
Not open for further replies.

CDNJungler

Programmer
Jul 16, 2002
11
CA
I'm developing and I have security set up so that when a user successfully logs in. It sets a value of true to a session variable. Now when using my frames pages the login page is the source for the main frame and I have a navigational page for the left frame. But when the person logs in, then tries to navigate through the use of the left frame links. the session variable value is gone!!! But if I then just go out and click browse through IIS to the same page as previously mentioned the value true for the session variable is recognized. Please if someone could help me figure out how to maintain this value it would definatley help me stay employed! thanks
 
I had this problem awhile ago and just ended up setting a cookie after the login with no expiration date so it was deleted on session end.
I then checked it for each individual page for the true value. This was a quick fix due to time restraints and
I'm sure there's a better way though.

maybe someone else will let you in on it.

[bomb]
I may not get it the 1st or 2nd time,
but how sweet that 15th time can be.
admin@onpntwebdesigns.com
 
CDNJungler

The same thing happened to me on two of my sites. The session was dropping dead when users viewed pop windows on my site and closed them. Closing the pop windows would close the session! The session variables would all drop dead. I tested this over and over, writing all session variable to the bottom of the screen (so only an administrator like me could view them).

sub showSession()
For Each sItem In Session.Contents

Response.Write &quot;<br>&quot; & sItem & &quot; - &quot; & Session.Contents(sItem)
Next
end sub


My ultimate fix: I stripped all session variables from my site (I only used about 8-10). I now use a 30 character random querystring to identify the user, and do database hits in an include at the top of each page to get any user info/ progress info that I need. It's probably the same thing as using cookies, but I can store everything in my database and the performance/stability is rock solid! You will have to add the special ID string to any internal links in your site or you will lose the ID when you go from page to page. This is easy since I wrote some functions to create querystrings.

Nelson
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top