p2p.wrox.com Forums

Need to download code?

View our list of code downloads.


Go Back   p2p.wrox.com Forums > ASP.NET and ASP > ASP.NET 2.0 > ASP.NET 2.0 Basics
I forgot my password Register Now
Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
ASP.NET 2.0 Basics If you are new to ASP or ASP.NET programming with version 2.0, this is the forum to begin asking questions. Please also see the Visual Web Developer 2005 forum.

Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 2.0 Basics section of the Wrox p2p Programmer to Programmer discussion community. This is a community of more than 40,000 computer programmers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining our free Wrox p2p community you can post your own programming questions and respond to other programmers’ questions. Registered users also don't have to see the ads that are displayed to guests. Registration is fast, simple and absolutely free so please, join today!
Join today and post to win prizes! Post more to increase your chances of being Wrox’s top poster of the month.

Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old June 12th, 2006, 12:56 PM
Friend of Wrox
Points: 1,376, Level: 14
Points: 1,376, Level: 14 Points: 1,376, Level: 14 Points: 1,376, Level: 14
Activity: 20%
Activity: 20% Activity: 20% Activity: 20%
 
Join Date: Jul 2005
Location: , , .
Posts: 298
Thanks: 0
Thanked 0 Times in 0 Posts
Default Session Variable Problem

I'm trying to use session variables throughout a new dynamic site that I've created, but I'm running into problems with the session var's timing out even though there is activity by the user.

These are the basic steps that are involved with the sessions:
1) The user logs in with a username & password that must match a DB record (level1.aspx). This form's submittal redirects the user's browser to a background script page (bgscript.aspx).

2) If user is valid, SessionID is set for user on the background script page, like this:

Dim strSessionID As String = Session.SessionID
Session("SessionID") = strSessionID

Then the user is then redirected to the dynamic main page for the site (level2.aspx).

3) On level2.aspx, the Session.Timeout is set for 40 minutes. All pages are accessed dynamically from this page through SSI's. If the user's SessionID is empty, then they're redirected like this:

If Session("SessionID") = "" Then
    Response.Redirect("logoff.aspx?timeout=true")
End If

The problem is that while the user browses the pages dynamically through the level2.aspx main page, the sessions all timeout after 20 minutes even though the user is active.

Could this be happening because I'm setting the SessionID on the bgscript.aspx page vs. the level2.aspx page? (Note: I'm doing that because the SessionID is inserted into a DB table on this same bgscript.aspx page) Shouldn't session variables pass between any pages on a site as long as the browser window is open? I'd really appreciate any help. Thanks.

KWilliams
__________________
KWilliams
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
problem with session variable prabhatsriva01 ASP.NET 2.0 Professional 3 May 10th, 2007 12:41 PM
Session Variable Problem caterpillar General .NET 0 August 17th, 2006 12:26 PM
Another Session Variable Problem jim.sullivan@telus.net ASP.NET 1.1 8 August 7th, 2004 01:56 AM
Another Session Variable Problem jim.sullivan@telus.net Classic ASP Databases 1 August 1st, 2004 04:58 AM
Session Variable Problem leo_vinay ASP Pro Code Clinic 3 February 15th, 2004 12:28 PM



All times are GMT -4. The time now is 06:33 AM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
© 2008 Wiley Publishing, Inc