i am new to asp.net..please help me to write code for setting session timeout and how to implement in all pages,i tried out using web config method,but not getting,i am nearing to deadline. This is my code
-
Where is the code, what did you try and what do you meand "but not getting"? Have you activated session state at all? The default timeout is 20 minutes, so you should be able to read anything you store in Session state for at least 20 minutes. If you can't either your code is wrong or you haven't activated Session state at all.Panagiotis Kanavos– Panagiotis Kanavos2013-07-31 08:31:47 +00:00Commented Jul 31, 2013 at 8:31
-
possible duplicate of Session timeout in ASP.NETPanagiotis Kanavos– Panagiotis Kanavos2013-07-31 08:32:09 +00:00Commented Jul 31, 2013 at 8:32
-
add timeout=2000 in connection string.Janki– Janki2013-07-31 08:45:03 +00:00Commented Jul 31, 2013 at 8:45
Add a comment
|
2 Answers
Using Web.config
<sessionState
timeout="number of minutes"............
Full reference HERE !
or
Using Forms authentication
<system.web>
<authentication mode="Forms">
<forms timeout="50"/>
</authentication>
<sessionState timeout="60" />
</system.web>
1 Comment
user2637192
thanks..but i have one more doubt...will it be applicable to all pages,shall i need to do any coding for aspx.cs pages..reply please