473,612 Members | 2,129 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 3161
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.n et...
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
2984
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 their web pages. Let's say they both create the session variable $_SESSION. Each uses yo for a different purpose. Now we have a user accessing address.com. He goes to Bill's site and his session his started with the $_SESSION created.
2
3258
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 the same id. Just so you know, I don't need to make the session id change for any reason. I'd just like to know what to avoid since I'm going to be storing data the user enters with their sessionid and I'd like to make sure that they can...
2
2834
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, once this page is displayed all links go to secure pages using SSL. What seems to be happening is that when a link to a secure page is followed the session is lost and the user is re-directed to the login page, is something in the passing between...
3
290
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!! Code like below object a = new class() session.add("A",a) session.add("B",a) .... session.remove("A") Session = null ???
6
1619
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 would make it so I would not need to check if session vars were still around. I'm confused! Perhaps someone can clear this up for me? -- ******************************** Jon
7
1227
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 a Stored Proc to create a datatable in most cases. This seems like a waste to me. Is this good? Public Shared Function getSQL(ByRef thePage As Page) As ProjectName.SQLServer If thePage.Session("mySQLInit") = "1" Then Return...
7
4243
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 static void GetSessions() { HttpContext ctx = HttpContext.Current; ctx.Session; // not available. <undefined value>
7
2002
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 inserted in the db to show who edited the record
0
8162
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8605
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8565
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
7039
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5532
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4045
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4109
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2550
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1695
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.