Reputation: 10723
In my web.config I have this:
<sessionState timeout="70"/>
However, after 5 minutes my session is null and my program crashes. How to make this time longer?
Here is how I initialize it:
Session["mySession"] = "blah blah";
Upvotes: 2
Views: 1709
Reputation: 1990
the time that you putting inside the Web.Config
<sessionState timeout="60"/>
(it in minutes)
affect on the
HttpContext.Current.Session.Timeout = 60
or
System.Web.HttpContext.Current.Session.Timeout = 60
Upvotes: 0
Reputation: 573
Modify the timeout like this:
HttpContext.Current.Session.Timeout = 200000
Upvotes: 2
Reputation: 3436
Check the applicationpool timeout http://technet.microsoft.com/nl-nl/library/cc771956%28v=ws.10%29.aspx
Using forms authetication? It got it's own timeout/
Upvotes: 1