• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 397
  • Last Modified:

Session Timeout asp.net

Hello everyone.

I don't get what i am missing, i have a asp.net website and i need a session to last at least 2 hours. So what i have done is,

In IIS, right clicked the website adn gone to proerties, Click Home Directory tab, Click configure. In configure i click the options tab adn chaged Enable Session State to 120 minutes.

Within my code i have written the following after the session

Session.Timeout = 120.

However, the session only last about 5 minutes.

Can anyone help me with this.
Thank you in advanced
  • 2
2 Solutions
Pratima PharandeCommented:
In webconfig file...



<sessionState timeout="120"></sessionState>

BakersvilleAuthor Commented:
Thank you for this.

I have updated my webconfig file and will let you know how i get i.

Dhanasekaran SengodanCommented:
BakersvilleAuthor Commented:
Thank you both.  Made all the changes and it seems to be working ok.

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.

Join & Write a Comment

Featured Post

Cloud Class® Course: Certified Penetration Testing

This CPTE Certified Penetration Testing Engineer course covers everything you need to know about becoming a Certified Penetration Testing Engineer. Career Path: Professional roles include Ethical Hackers, Security Consultants, System Administrators, and Chief Security Officers.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now