ASP.NET Session Timeout

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?
LVL 2
CipherISAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Kyle AbrahamsSenior .Net DeveloperCommented:
It could be in your IIS.  Ensure the worker process is not recycling.
0
Lalit ChandraCommented:
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
CipherISAuthor Commented:
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
Cloud Class® Course: SQL Server Core 2016

This course will introduce you to SQL Server Core 2016, as well as teach you about SSMS, data tools, installation, server configuration, using Management Studio, and writing and executing queries.

käµfm³d 👽Commented:
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
CipherISAuthor Commented:
No - i don't have Session.Abandon in my code
0
käµfm³d 👽Commented:
What specific behavior are you witnessing?
0
CipherISAuthor Commented:
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
masterpassCommented:
Do you perhaps have an inactivity detector in Javascript?
0
CipherISAuthor Commented:
no - i don't
0
CipherISAuthor Commented:
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
CipherISAuthor Commented:
Anyone have any ideas?
0
Lalit ChandraCommented:
r u using Asp.net Session object in Global.asax.cs file ??
0
CipherISAuthor Commented:
No.  I tried to add it but it gave me an error.
0
Lalit ChandraCommented:
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
CipherISAuthor Commented:
still troubleshooting.
0
CipherISAuthor Commented:
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

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
CipherISAuthor Commented:
its an issue on Dev server where worker process is recycling
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
ASP.NET

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.