Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

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


Featured Post

Prepare for your VMware VCP6-DCV exam.

Josh Coen and Jason Langer have prepared the latest edition of VCP study guide. Both authors have been working in the IT field for more than a decade, and both hold VMware certifications. This 163-page guide covers all 10 of the exam blueprint sections.

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