473,326 Members | 2,113 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,326 software developers and data experts.

Session Question

ASP.NET 2.0/IIS 6/Windows 2003

I have all my session settings set to the standard 20 min. but many times
the session will time out prior to 20 min. of inactivity. My questions are:

1. Is there any way to find out why a session was reset?
2. Is there anything other than a session ID I can use to record data
throughout a "session" (From the time someone starts visiting until they
finish) I can't use client IP address because we get to many hits from the
same IP that are different users.
Jun 8 '07 #1
4 3115
Ysgrifennodd Bishop:
ASP.NET 2.0/IIS 6/Windows 2003

I have all my session settings set to the standard 20 min. but many times
the session will time out prior to 20 min. of inactivity. My questions are:

1. Is there any way to find out why a session was reset?
2. Is there anything other than a session ID I can use to record data
throughout a "session" (From the time someone starts visiting until they
finish) I can't use client IP address because we get to many hits from the
same IP that are different users.

Does this help?

http://aspalliance.com/520

By the way, you need to check both the session timeout and the cookie
timeout. If the cookie times out before the session does then the
session will be closed. Assuming you are using cookies, of course.

HTH
Peter
Jun 8 '07 #2
Hi,

Peter Bradley wrote:
By the way, you need to check both the session timeout and the cookie
timeout. If the cookie times out before the session does then the
session will be closed. Assuming you are using cookies, of course.
Are you sure?

Session cookies don't expire as long as the browser is open, so that
can't be it.

Even if the cookie expired on the client, the current session wouldn't
expire early. In the contrary, a new session with a different session ID
would be started when the browser sends the next request, because the
cookie (coming from the client) can't be found. But the existing session
will expire only after the set timeout.

HTH,
Laurent
--
Laurent Bugnion [MVP ASP.NET]
Software engineering, Blog: http://www.galasoft.ch
PhotoAlbum: http://www.galasoft.ch/pictures
Support children in Calcutta: http://www.calcutta-espoir.ch
Jun 10 '07 #3
Ysgrifennodd Laurent Bugnion, MVP:
>

Are you sure?

Session cookies don't expire as long as the browser is open, so that
can't be it.

Even if the cookie expired on the client, the current session wouldn't
expire early. In the contrary, a new session with a different session ID
would be started when the browser sends the next request, because the
cookie (coming from the client) can't be found. But the existing session
will expire only after the set timeout.

HTH,
Laurent
Heh. No, I'm not sure, Laurent. And you sound confident, so I would
guess that you're right and that my logic is faulty.

Thanks for the heads up.

:)
Peter
Jun 10 '07 #4
Peter and Laurent, thanks for the help. When I create a cookie I set it to
expire in 1 day but I'm not using cookies for this, unless there is a
dependency on cookies with sessions that I'm not aware of. I have two
instances that tells me my session is resetting:

1. An admin program that all at my company uses all day long (about 5 of us)
uses a session for authentication which will show up blank throughtout the
day. Many time after only 5 min. of inactivity.

2. When someone comes to our public website each page checks to see if a
session variable "referer" is populated. If not, we populate it with the
referer and log it to a table in the database. It appears from our testing
that a typical session will reset because throughout a session on our site
the origional referer will save to the db but also refererals from our own
site.
"Peter Bradley" <p.*******@dsl.pipex.comwrote in message
news:l9******************************@pipex.net...
Ysgrifennodd Laurent Bugnion, MVP:
>>

Are you sure?

Session cookies don't expire as long as the browser is open, so that
can't be it.

Even if the cookie expired on the client, the current session wouldn't
expire early. In the contrary, a new session with a different session ID
would be started when the browser sends the next request, because the
cookie (coming from the client) can't be found. But the existing session
will expire only after the set timeout.

HTH,
Laurent

Heh. No, I'm not sure, Laurent. And you sound confident, so I would
guess that you're right and that my logic is faulty.

Thanks for the heads up.

:)
Peter

Jun 11 '07 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

9
by: Xizor | last post by:
Let's say I run a server. I have two people using the server. Bill and Joe. Bill is at address.com/bill and Joe is at address.com/joe. Let's say Joe and Bill are both using PHP with sessions on...
2
by: Jason Telisch | last post by:
I read and reread the PHP manual about sessions, and I have a quick question. What causes the session id to change? I tried destroying the session and unsetting the session vars, but it maintains...
2
by: Peter Rooney | last post by:
Hi, Just a quick question, I have a login page that sits on a non secure page, if the users login details are correct then a session is created and they are passed to another non secure page,...
3
by: lzh_gladiator | last post by:
hello In ASp.net application,there are two created session object was attatched to one object,if I remove one of session object , does the other keeps normal or destoryed ? Thanks In advance!!...
6
by: Jon | last post by:
If a session times out, but the forms auth is still logged in it's possible for users to go to pages on the site that need those session variables. I was under the impression that using forms auth...
7
by: Chris | last post by:
I'm on a project where the prevoius developer wrote code like below. I thought stuff like this was bad? Isn't he putting a page into a session object? And what we are trying to do is hit the db via...
7
by: Hardy Wang | last post by:
Hi, I have a web application, code of ASPX page needs to call one static method in another class which does not inherit System.UI.Page class using System.Web; public class Utils { public...
7
by: Mangler | last post by:
Here is the process on the site before I ask the question: User logs in session is created based on username and userid user edits a record in the db a hidden field with the userid session is...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.