Solved

ASP.NET Session Timeout

Posted on 2012-03-29
17
770 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 10
  • 3
  • 2
  • +2
17 Comments
 
LVL 40

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
Increase Agility with Enabled Toolchains

Connect your existing build, deployment, management, monitoring, and collaboration platforms. From Puppet to Chef, HipChat to Slack, ServiceNow to JIRA, Splunk to New Relic and beyond, hand off data between systems to engage the right people.

Connect with xMatters.

 
LVL 75

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 75

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
 
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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Entity Framework is a powerful tool to help you interact with the DataBase but still doesn't help much when we have a Stored Procedure that returns more than one resultset. The solution takes some of out-of-the-box thinking; read on!
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.
Come and listen to Percona CEO Peter Zaitsev discuss what’s new in Percona open source software, including Percona Server for MySQL (https://www.percona.com/software/mysql-database/percona-server) and MongoDB (https://www.percona.com/software/mongo-…
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…

717 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