Solved

ASP.NET Session Timeout

Posted on 2012-03-29
17
759 Views
Last Modified: 2012-04-23
I have an ASP.NET webiste I developed.  I have the following in my web.config file.

      <sessionState cookieless="true" timeout="20" />

However, it seems my session is timing out after 3 mins.  Any ideas how to resolve?
0
Comment
Question by:CipherIS
  • 10
  • 3
  • 2
  • +2
17 Comments
 
LVL 39

Expert Comment

by:Kyle Abrahams
ID: 37784131
It could be in your IIS.  Ensure the worker process is not recycling.
0
 
LVL 7

Expert Comment

by:Lalit Chandra
ID: 37784160
Chances are the worker process is recycled meantime, Where do you store the sessions?
Making your sessions stored out of process may helps.

you can also know about another settings quickly from the nice article below

http://ramanisandeep.net/2011/03/19/tipstrick-session-timeout-problem-in-iis7/

Hope this will help.
0
 
LVL 1

Author Comment

by:CipherIS
ID: 37784271
Thanks but that did not solve the problem.

Application pool’s Idle Time-out = 20 Mins

Session State Mode Settigs Values
-  In PRocess

Cookie Settings
- Mode = Use URI
- Regenerate expired session ID = true

Use hosting identity for impersonation = true
0
 
LVL 74

Expert Comment

by:käµfm³d 👽
ID: 37784304
Do you have any calls to Session.Abandon in your code? If you do, perhaps one is being triggered inadvertently, which forces a new session on the next request to your site by a given user.
0
 
LVL 1

Author Comment

by:CipherIS
ID: 37784315
No - i don't have Session.Abandon in my code
0
 
LVL 74

Expert Comment

by:käµfm³d 👽
ID: 37784318
What specific behavior are you witnessing?
0
 
LVL 1

Author Comment

by:CipherIS
ID: 37784341
i click on a button which redirects me to a page.  I wait 1 minute - click on another button which goes to another page - no problem

I repeat above but wait 3 mins before clicking on button for redirect and the session is expired.
0
 
LVL 21

Expert Comment

by:masterpass
ID: 37784436
Do you perhaps have an inactivity detector in Javascript?
0
Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

 
LVL 1

Author Comment

by:CipherIS
ID: 37787133
no - i don't
0
 
LVL 1

Author Comment

by:CipherIS
ID: 37787694
There is an error msg on the server in the Logs which says:

Session state is not available in this context at System.Web.HttpApplicaitonFactory.EnsureAppStartCalledForIntegratedMode (HttpContext.context, HttpApplicaiont app) at System.Web.HttpApplicaiton.RegisterEventSubscriptionWithIIS(InPtrSystem.Web.HttpApplication.RegisteredEventSbscriptionWithIIS .....
0
 
LVL 1

Author Comment

by:CipherIS
ID: 37797027
Anyone have any ideas?
0
 
LVL 7

Expert Comment

by:Lalit Chandra
ID: 37797127
r u using Asp.net Session object in Global.asax.cs file ??
0
 
LVL 1

Author Comment

by:CipherIS
ID: 37801679
No.  I tried to add it but it gave me an error.
0
 
LVL 7

Expert Comment

by:Lalit Chandra
ID: 37802409
please provide the full information or post the code that you think is the root cause of this problem. Is this session timeout issue happen on every page or any specific page or any specific event ??
0
 
LVL 1

Author Comment

by:CipherIS
ID: 37838414
still troubleshooting.
0
 
LVL 1

Accepted Solution

by:
CipherIS earned 0 total points
ID: 37863160
It seems to be a problem with the VM.  I copied the code to prod and not having the issue.  Something has to be recycling to cause the problem.
0
 
LVL 1

Author Closing Comment

by:CipherIS
ID: 37880023
its an issue on Dev server where worker process is recycling
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Exception Handling is in the core of any application that is able to dignify its name. In this article, I'll guide you through the process of writing a DRY (Don't Repeat Yourself) Exception Handling mechanism, using Aspect Oriented Programming.
Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.

707 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now