By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
443,505 Members | 1,165 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 443,505 IT Pros & Developers. It's quick & easy.

Session variables disappear

P: n/a
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
Share this Question
Share on Google+
5 Replies


P: n/a
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

P: n/a
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.net...
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

P: n/a
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.net...
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

P: n/a
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.com> wrote in message
news:%2****************@TK2MSFTNGP10.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.net...
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

P: n/a
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*************@TK2MSFTNGP09.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.net...
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 discussion thread is closed

Replies have been disabled for this discussion.