Click here to Skip to main content
15,884,177 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
hi ,,
hi i have a session for saving User Id,,,
i want to set this session expire time to the 15 minutes...
how can i do this ??
Posted

Edit the Web.config file ...In the System Web tag write this line

C#
<sessionstate timeout="15"></sessionstate>


only...
 
Share this answer
 
Comments
seyed mahmud shahrokni 29-Oct-13 14:13pm    
i like that !!!
Subhra Sankha Saha 29-Oct-13 14:24pm    
Thanks !!
<configuration>
<system.web>
<sessionstate
mode="InProc"
cookieless="true"
timeout="30" />
</sessionstate></system.web>
</configuration>
 
Share this answer
 
v2
Comments
Rajesh waran 10-Dec-14 2:20am    
Dude It's an old question(crossed nearly more than 1 year), which is already have a solution.No need to reply now.
Tushar sangani 10-Dec-14 2:30am    
i don't know About That
XML
<authentication mode="Forms">
  <forms loginUrl="~/Account/Login" timeout="30" slidingExpiration="true" />
</authentication>
<sessionState timeout="30"></sessionState>

</system.web>


By
http://www.code-sample.com/2014/06/distinct-values-from-list-using-linq.html[^]
 
Share this answer
 
v2
Comments
CHill60 23-Jun-14 8:15am    
For information - providing "solutions" that just drive traffic to your own site or blog is considere spam. Please stop.
TrushnaK 23-Jun-14 8:17am    
you are late... question was asked on 29-Oct-13 12:53pm
Anil Singh 2010 26-Jun-14 6:22am    
sorry dear, will mind next time.
Try:
C#
Session.Timeout = 15;
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900