473,503 Members | 2,163 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Session variable losing value

I have an asp.net web application that uses session variables to store
user information (username, security areas, configuration data). When
the user logs into the system I store all of this information in a
class and then dump it into a session variable. The timeout on the
server is set to 2hrs. Every now and then (5min-30min) the web server
will lose the session variable. This is very inconsistent and doesn't
appear to have an associated pattern. Has anyone else come across this
issue and determined the root cause?
I've found a lot of posts that describe this issue but none that
actually pinpoint the cause or solution.

Please don't recommend that I use cookies, some other solution or
question why I'm storing this information in a session variable. The
application is structured in this way to meet specific user/regulatory
requirements and user imposed constraints.

Thanks!
Nate
Nov 17 '05 #1
2 2402
Are you sure that the user keeps interacting with your web site for 2 hrs
after he logs in? Typically, I guess you maintain one session class object
per user and populates this class once the user logs in. Once the user
terminates his session (by logging out and closing the browser), it is lost.
That is how a session is defined logically.

"Nate Spillson" <na********@spillson.com> wrote in message
news:1c*************************@posting.google.co m...
I have an asp.net web application that uses session variables to store
user information (username, security areas, configuration data). When
the user logs into the system I store all of this information in a
class and then dump it into a session variable. The timeout on the
server is set to 2hrs. Every now and then (5min-30min) the web server
will lose the session variable. This is very inconsistent and doesn't
appear to have an associated pattern. Has anyone else come across this
issue and determined the root cause?
I've found a lot of posts that describe this issue but none that
actually pinpoint the cause or solution.

Please don't recommend that I use cookies, some other solution or
question why I'm storing this information in a session variable. The
application is structured in this way to meet specific user/regulatory
requirements and user imposed constraints.

Thanks!
Nate

Nov 17 '05 #2
It really depends on what you mean by "logging out and closing the browser".
If there is code to call Session.Abandon() in the sign out code, then yes,
this ends the session. But you don't know if there is.

Simply closing the browser does not end the session. The session continues
until the timeout.

However, any new browser instances will create a new session - while the
original one is still alive until the timeout occurrs.
Things that can occur an applications restart:
1) chaging DLL's, web.config, etc on the server
2) certain antivirus scanners that scan the above files, thus triggering a
restart

"Rao TRN" <tr*******@hotmail.com> wrote in message
news:%2****************@TK2MSFTNGP09.phx.gbl...
Are you sure that the user keeps interacting with your web site for 2 hrs
after he logs in? Typically, I guess you maintain one session class object
per user and populates this class once the user logs in. Once the user
terminates his session (by logging out and closing the browser), it is lost. That is how a session is defined logically.

"Nate Spillson" <na********@spillson.com> wrote in message
news:1c*************************@posting.google.co m...
I have an asp.net web application that uses session variables to store
user information (username, security areas, configuration data). When
the user logs into the system I store all of this information in a
class and then dump it into a session variable. The timeout on the
server is set to 2hrs. Every now and then (5min-30min) the web server
will lose the session variable. This is very inconsistent and doesn't
appear to have an associated pattern. Has anyone else come across this
issue and determined the root cause?
I've found a lot of posts that describe this issue but none that
actually pinpoint the cause or solution.

Please don't recommend that I use cookies, some other solution or
question why I'm storing this information in a session variable. The
application is structured in this way to meet specific user/regulatory
requirements and user imposed constraints.

Thanks!
Nate


Nov 17 '05 #3

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

Similar topics

1
2767
by: Scott Lyon | last post by:
I'm maintaining (read: I didn't write it, nor do I have the time to spend to rewrite it) an application that is suddenly giving me grief. The reason I say suddenly, is because we're in the...
6
2365
by: Al Jones | last post by:
This is a repost form the vbscript newgroup - if this isn't the appropriate group would you point me toward one that is. Basically, I seem to be losing session data part way though preparing an...
5
4122
by: Marc Rivait | last post by:
Here is a very interesting scenario. I have a simple test application that loads a page and sets a session variable on the load event. On the first page there is a link to a second page. The...
4
2153
by: Stephen | last post by:
I have a .NET (1.1 framework) application that is losing a session variable on only a few PC's. The main page is loading up in a frame in a Portal application. On the Page_Load it stores an...
2
6153
by: Joe Molloy | last post by:
Hi, This isn't a mission critical question but I thought I'dl throw it out there for your feedback as it's a bit curious. I have developed a shopping cart for an application I'm working on...
1
737
by: Werner | last post by:
Hi Patrick! Can you give an example of how to use a frameset inside an aspx-file? When I create a new frameset in Visual Studio.Net it just gives me a htm-File. Or give me a link where I can...
4
2390
by: Keith-Earl | last post by:
I have been writing ASP.NET apps since the RTM build and have never seen this. I built a simple app that uses session variables on my DEV laptop. All runs well. I have a simple toggle routine...
9
2532
by: Adrian Parker | last post by:
We have a website that works everywhere but on a few PCs on this one site.. Asp.Net 1.1 Server = Windows 2003 Client = XP In the web.config we use - cookieless="false" in the browser settings...
5
3162
by: TRB_NV | last post by:
I'm losing information from my Session when I change pages or start the same page over again. I simplified the code so the example is really clear. The sample code that follows is supposed to...
0
2269
by: tharika_c | last post by:
Hi, We have a simple ASP.NET web application where one of the Session variables, called Session("SSO_ID") gets created and assigned a value (equal to the HTTP_HRID request variable value),...
0
7205
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,...
0
7287
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,...
0
7353
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...
1
7011
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7468
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5596
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,...
1
5023
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
3180
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...
0
3170
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

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.