473,692 Members | 2,160 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Session variables disappear

Hi all,

We have a small problem.

We are running an ASP.NET1.1 application, using IIS6 on server2003, no web
farm, on a single server, using in-proc session state, only using one worker
process.

The problem is that at seemingly random times, some of the session variables
return as if set to nothing.

We are using session variables to pass small objects from one page request
to the next. Which seems to work perfectly most of the time, but as I said
above, at random times, some but not all of the session variables return as
nothing.

Anyone any ideas?

Thanks in advance and Regards,
Simon.
Feb 7 '06 #1
5 3070
This is hard to diagnose without a lot of context information, but here is a
suggestion:

Try switching to cookieless for a while and see if the problem persists. If
not, then it may be some sort of cookie issue. The only other thing to be
aware of is that IIS process recycling will force you to lose session state.
The IIS settings on that may be too aggressive.
Peter
--
Co-founder, Eggheadcafe.com developer portal:
http://www.eggheadcafe.com
UnBlog:
http://petesbloggerama.blogspot.com


"Simon" wrote:
Hi all,

We have a small problem.

We are running an ASP.NET1.1 application, using IIS6 on server2003, no web
farm, on a single server, using in-proc session state, only using one worker
process.

The problem is that at seemingly random times, some of the session variables
return as if set to nothing.

We are using session variables to pass small objects from one page request
to the next. Which seems to work perfectly most of the time, but as I said
above, at random times, some but not all of the session variables return as
nothing.

Anyone any ideas?

Thanks in advance and Regards,
Simon.

Feb 7 '06 #2
check the event log for asp.net recycles - these will clear inproc sessions.
(real production servers should not use inproc sessions for this reason)

-- bruce (sqlwork.com)

"Simon" <s@v.c> wrote in message
news:43******** *************** @ptn-nntp-reader03.plus.n et...
Hi all,

We have a small problem.

We are running an ASP.NET1.1 application, using IIS6 on server2003, no web
farm, on a single server, using in-proc session state, only using one
worker process.

The problem is that at seemingly random times, some of the session
variables return as if set to nothing.

We are using session variables to pass small objects from one page request
to the next. Which seems to work perfectly most of the time, but as I said
above, at random times, some but not all of the session variables return
as nothing.

Anyone any ideas?

Thanks in advance and Regards,
Simon.

Feb 7 '06 #3
You can use performance monitor to see how often .NET application restarts.
When it does so all sessions are lost.

Couple reasons why application would restart.

1. new version of DLL was uploaded into BIN folder.
2. More than 15 aspx files were updated/added (15 is configurable value but
by default it's 15).
3. Folder in the project directory was created/removed.
4. There is antivirus active on the machine. Although it will not modify
aspx files it will trigger same sequence as it would. (See #2)
5. The application hanged or reached it's memory limit.

Also check eventlog there might be something in there especially if you have
case #5.


George.

"Simon" <s@v.c> wrote in message
news:43******** *************** @ptn-nntp-reader03.plus.n et...
Hi all,

We have a small problem.

We are running an ASP.NET1.1 application, using IIS6 on server2003, no web
farm, on a single server, using in-proc session state, only using one
worker process.

The problem is that at seemingly random times, some of the session
variables return as if set to nothing.

We are using session variables to pass small objects from one page request
to the next. Which seems to work perfectly most of the time, but as I said
above, at random times, some but not all of the session variables return
as nothing.

Anyone any ideas?

Thanks in advance and Regards,
Simon.

Feb 7 '06 #4
Thanks for the reply,

What would you suggest we use instead of inproc.
We have looked at sqlserver, but all objects that you put in session must be
serializable, which some of them aren't

Thanks,
Simon.

"Bruce Barker" <br************ ******@safeco.c om> wrote in message
news:%2******** ********@TK2MSF TNGP10.phx.gbl. ..
check the event log for asp.net recycles - these will clear inproc
sessions. (real production servers should not use inproc sessions for this
reason)

-- bruce (sqlwork.com)

"Simon" <s@v.c> wrote in message
news:43******** *************** @ptn-nntp-reader03.plus.n et...
Hi all,

We have a small problem.

We are running an ASP.NET1.1 application, using IIS6 on server2003, no
web farm, on a single server, using in-proc session state, only using one
worker process.

The problem is that at seemingly random times, some of the session
variables return as if set to nothing.

We are using session variables to pass small objects from one page
request to the next. Which seems to work perfectly most of the time, but
as I said above, at random times, some but not all of the session
variables return as nothing.

Anyone any ideas?

Thanks in advance and Regards,
Simon.


Feb 8 '06 #5
Thanks for the reply George,

Surely if the application restarts, then all current sessions will end and
all session variables will disappear which we test for at the start of each
page load.

The problems occur after it has already returned several session items, and
then one of them comes back as nothing.

Perhaps the application is restarting mid request? is that possible? or is
it possible that objects can get GC'd when in session?

Regards,
Simon.

"George Ter-Saakov" <gt****@cardone .com> wrote in message
news:OT******** *****@TK2MSFTNG P09.phx.gbl...
You can use performance monitor to see how often .NET application
restarts.
When it does so all sessions are lost.

Couple reasons why application would restart.

1. new version of DLL was uploaded into BIN folder.
2. More than 15 aspx files were updated/added (15 is configurable value
but by default it's 15).
3. Folder in the project directory was created/removed.
4. There is antivirus active on the machine. Although it will not modify
aspx files it will trigger same sequence as it would. (See #2)
5. The application hanged or reached it's memory limit.

Also check eventlog there might be something in there especially if you
have case #5.


George.

"Simon" <s@v.c> wrote in message
news:43******** *************** @ptn-nntp-reader03.plus.n et...
Hi all,

We have a small problem.

We are running an ASP.NET1.1 application, using IIS6 on server2003, no
web farm, on a single server, using in-proc session state, only using one
worker process.

The problem is that at seemingly random times, some of the session
variables return as if set to nothing.

We are using session variables to pass small objects from one page
request to the next. Which seems to work perfectly most of the time, but
as I said above, at random times, some but not all of the session
variables return as nothing.

Anyone any ideas?

Thanks in advance and Regards,
Simon.


Feb 8 '06 #6

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

Similar topics

5
2568
by: Ben | last post by:
Hello, My $_SESSION variables disappear and reappear. It's not just a matter of not caching the page. I usually have to press the Refresh button about 3 times to get the page to remember the variables. Sometimes refreshing again will cause the variables to disappear again. PHPSESSID will often be empty after using session_start(). Any ideas on how to limit this action? Thanks, Ben
9
3639
by: Pack Fan | last post by:
I've noticed that session variables will persist on Mac IE even after all browser windows have been closed. One must quit the program to clear the session variables. This presents a security risk for my session variable based security scheme. Basically, the risk is that a user will login to my site, close the window when done and allow someone else to come up to the machine, go back to my site and be logged into the previous user's...
5
4017
by: Larry Woods | last post by:
I am losing Session variables, but only those that are set in the page previous to a redirect to a secure page. Anyone seen ANY situation where Session variables just "disappear?" Note that OTHER session variables are still intact !?! TIA, Larry Woods
9
2450
by: William LaMartin | last post by:
I have a problem, mentioned here before, of Session and Application variables disappearing at one site but not at others or on my development computer. The problem is illustrated by an example at http://www.lamartin.com/dotnet/sessiontestset.aspx, were I set Session, Application and Cache variables on the first page and then on the second page view them as the second page is refreshed every five seconds. Before 10 refreshes, the...
4
5586
by: PJ | last post by:
A particular page seems to be having issues with correctly setting Session variables. I am setting a couple of session variables on the Page_Unload event. While stepping through code, the immediate window will show the values in Session after the relevant lines that set the variables in the Page_Unload event. However, on postback, these variables are no longer in Session. All Session variables that were set previous to that particular...
1
2094
by: Wiktor Zychla | last post by:
Hello there, I've just encountered a strange problem with Session. In one particular scenario it is cleared between pages but the scenario is so specific that I am really, really startled. I've tried to look for similar situations in the group archive and it seems that few people have observed similar behaviour. None of them, however, got a clear explanation that would correspond to my problem. In my web application I put some...
6
1621
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
2070
by: Frank Schumacher | last post by:
Hi NG, I have a weird problem, that's starting to get my sanity. My webapplication stores several values in Session. After a server roundtrip, no Session variables exist anymore (Session.Count is 0) I have logged the Session.SessionID, it is the same as before. I have logged the last and the first line of code in my Codebehind. When
13
2835
by: Alexander Widera | last post by:
hi, who has seen the follow problem or could help please? i visit a page .... i read a sesssion-var . ... everythink works...... i visit the page again..... error ... the sessionvar is null .... i visit again .... null ... again .... it works ..... again ... it works ... again ..... null....... and so on and on .... it does randomly work or not.... what is this effect?
0
8604
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
9083
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
8961
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
7627
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...
1
6459
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4324
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
4557
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2974
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
2
2238
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.