473,569 Members | 2,593 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Session times out too soon...

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.
ja********@onei lsoft.com
Nov 19 '05 #1
3 2078
James Hunter Ross wrote:
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


Nov 19 '05 #2


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

*** Sent via Developersdex http://www.developersdex.com ***
Nov 19 '05 #3
Robert Meyer wrote:

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 "Applicatio n 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.

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


Nov 19 '05 #4

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

Similar topics

4
1229
by: genc ymeri | last post by:
Hi I have placed an encounter code in the session_end as well in the session_start. I'm decreasing the number with 1 everytime a session ends. I open several IE-s and I closed some of them but the number of sessions only increase. When really the session_end code get called ? I thought that once we close the IE, the session go to go, and the...
3
3052
by: Martin | last post by:
Hi all As my posting title suggests I'm having problems using InProc Session state in my ASP .NET app. I wrote a site for a friend which uses ADO .NET to keep track of a simple customer/purchases database. A user creates an account and a database entry is added to a customer table. Once a user successfully logs in with a valid...
2
3111
by: David Hearn | last post by:
I am using some temporary text files and xml files to store some data in during a users session. When their session ends (they leave the site or their session times out) I need to delete these files. What is the best way to do this? Thanks in advance!
13
2804
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...
9
9678
by: Markus | last post by:
Hi In cases where I need to store the session id and/or the remote host in a database I used to choose tinytext fields so far. Anyway the usual values for session ids are of 32 characters length, and IP addresses not longer than 15 characters - so using char(32) resp. char(15) would actually improve the database performance. But I did not...
6
1737
by: Marcus | last post by:
I have an ASP.Net 2.0 app that needs to jump out onto another web server running a java server page website (Apache TomCat 4.1.12) that I control. I hate that it needs to do this, but we are using some internet GIS mapping web tool that comes "precanned" with lots of mapping ability and its pages run on JSP. Theasp.net Session_End event is...
16
2037
by: emajka21 | last post by:
I created a website in ASP 2.0/c# that connects to an Access 2000 database. Currently I have 4 pages that people can view without logging in, which are reports that post marathon race results. Only one maybe two people will actually ever have to log in to enter the race data. For the login I created a form that asks for user name and...
2
3080
by: fijsolam1981 | last post by:
Hi, I had created a web application where Session expiry was set to 2,000 minutes in IIS. in web config i had given like this <sessionState timeout="2,000" mode="InProc"></sessionStatebut MY web application was left logged in at 18:00 15th Oct, but on the following day 08:30 16th Oct, the session expired as soon as MY web application was...
15
4786
by: sb5309 | last post by:
When one uses CAPTCHA (form with verification code), a session is required to keep the session data. In examples that I have seen on the net, I did not see a session is closed after use. Imagine a case when someone gets to a form with CAPTCHA, a session will be started in the server; and then the person decides to jump to another site...
0
7700
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...
0
7924
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. ...
0
8125
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...
0
6284
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...
1
5513
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...
0
3642
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2114
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
1221
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
938
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.