• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 392
  • 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

The 14th Annual Expert Award Winners

The results are in! Meet the top members of our 2017 Expert Awards. Congratulations to all who qualified!

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