Click here to Skip to main content
15,908,673 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Dear All ,
I am working in a web application project using asp.net ,my problem is I want to increase my Session time out to 2 hours ,For that I have changed in web.config file
<sessionState timeout="120"/> but is not working.

If you have any idea plz solve my problem.

Thanks,
kamalakanta
Posted
Comments
Thanks7872 23-Aug-13 5:55am    
How you figured out that its not working? Are you talking about IIS?
Kamalkant(kk) 23-Aug-13 6:06am    
yes
Kamalkant(kk) 23-Aug-13 6:06am    
yes

write this in code behind file..

Session.Timeout=120;
 
Share this answer
 
Comments
Kamalkant(kk) 23-Aug-13 6:14am    
in which page i will add
Abhishek Ginani 27-Aug-13 1:11am    
.cs file
Refer this link and make sure all set accordingly.

Why Session.Timeout is not working for your website[^]

Regards..:)
 
Share this answer
 
Fron WebConfig :
XML
<configuration>
  <system.web>
     <sessionstate timeout="20" />
  </system.web>
</configuration>

By default its 20 mins. Change it as per your needs.

use this
C#
<sessionState  mode="InProc" cookieless="false"  timeout="120"  />


Thanks & Regard
Sham :)
 
Share this answer
 
v2
Comments
Thanks7872 23-Aug-13 6:37am    
OP already used it. Don't you see <sessionstate timeout="120"> in question? And also comment to the question?
Thanks7872 23-Aug-13 7:05am    
Why?

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