Session times out too soon...

J

James Hunter Ross

Friends,

My web.config session setting is timeout=20, but in code we set the timeout
to override this to some user preference, often 40 minutes, (specified by
the user in seconds). But even in fairly active sessions, (ones where post
are done every 5 minutes or less), we still have session timing out.
Whether either the 20 minute or 40 minute value is in effect, I never wait
more than 5 minutes between posts back to the server (doing real work) so I
would NOT expect a session timeout.

Does anybody have any ideas about how to track this down? Are others having
similar results? Do I need to provide more data to make sense?

Thanks in advance for your time. I've been in software for 20+ years, but
new to ASP.NET. Our actual ASP.NET developers are baffled too.

Thanks! Sincerely,

James Hunter Ross
Senior Software Developer
O'Neil Software, Inc.
(e-mail address removed)
 
J

JIMCO Software

James said:
Friends,

My web.config session setting is timeout=20, but in code we set the
timeout to override this to some user preference, often 40 minutes,
(specified by the user in seconds). But even in fairly active
sessions, (ones where post are done every 5 minutes or less), we
still have session timing out. Whether either the 20 minute or 40
minute value is in effect, I never wait more than 5 minutes between
posts back to the server (doing real work) so I would NOT expect a
session timeout.

If you really are seeing Session loss (instead of something else that only
looks like Session loss), the most common cause would be an app domain
restart, assuming you are using InProc Session state.

Check the ASP.NET v1.1.4322 object in perfmon. There is a counter for
Application Restarts. Monitor that when you lose Session. If it increments
at the same time, your app domain recycling is causing the problem.

The most common cause of app domain restarts is file change notifications.
That would be caused by anti-virus or something else scanning the
application or from someone changing the web.config in the root folder or
something in the bin.

--
Jim Cheshire
JIMCO Software
http://www.jimcosoftware.com

FrontPage add-ins for FrontPage 2000 - 2003
 
R

Robert Meyer

I also experienced this issue and found Jim's post regarding
sessionState mode to be helpful.

I changed my sessionState mode from the default inproc to StateServer.
Of course, this is one of those situations where, after the change, I'm
waiting for the application to, uh, NOT break. But so far so good.

One question I had for Jim is about perfmon. This looks like a really
neat tool - I just wish I knew how to use it.

When you say to 'Check the ASP.NET v1.1.4322 object in perfmon' - how
does one do that?

Cheers,
Robert Meyer
ISG
http://www.isgcom.com
 
J

JIMCO Software

Robert said:
When you say to 'Check the ASP.NET v1.1.4322 object in perfmon' - how
does one do that?

Hi Robert,

Perfmon (Performance) is in Administrative Tools. When you launch it,
choose "ASP.NET v1.1.4322" from the object dropdown. That will populate the
Counter and Instance listboxes. Choose "Application Restarts" from the
Counter listbox and then choose your process (or Global) from the instance
listbox. Then click Add and then Close.

Now you will have an item in the listbox at the bottom of Perfmon for
Application Restarts. If you select it, you'll see a graph representation
and numeric values for that counter. If you see that increment when your
problem occurs, you'll know it was because of an app domain restart.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top