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?
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

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

Hope this will help.
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
Why Diversity in Tech Matters

Kesha Williams, certified professional and software developer, explores the imbalance of diversity in the world of technology -- especially when it comes to hiring women. She showcases ways she's making a difference through the Colors of STEM program.

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

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

From novice to tech pro — start learning today.