Click here to Skip to main content
15,892,005 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi, We are creating application application software. We have major issue in session. My application after 20 minutes automatically session expired. I have try to control the issue using meta tag. But it's refresh the page. But i don't need refresh the page. Please Help me. I have try lot of Ideas.But no improvement. please Guide me.
Posted
Updated 25-Mar-15 18:40pm
v2
Comments
Sujith Karivelil 26-Mar-15 0:44am    
what you have tried? have you set any time out for session?
Krishna Rpr 26-Mar-15 0:45am    
I have tried Meta tag. but it's refresh the page. but i don't need refresh the page
[no name] 26-Mar-15 1:07am    
You can increase the session time or use sqlserver mode to preserve the session time.
Krishna Rpr 26-Mar-15 1:09am    
Sorry Rajeeshmenoth I can't get ur point
[no name] 26-Mar-15 1:20am    
check this links..

https://msdn.microsoft.com/en-us/library/ms178586(v=vs.140).aspx
http://blogs.msdn.com/b/kenkilty/archive/2014/07/03/asp-net-session-state-using-sql-sever-in-memory.aspx

1 solution

You can do that by

1. Replacing the timeout value in web.config
HTML
<sessionstate timeout="40" />

here 40 means 40 minutes.

Or
2. In Session_Start method of Global.asax file, you can set the timeout property
C#
Session.Timeout = "40";


Update:

If you want unlimited session then you may consider using cookies instead of session as the purpose of using session is bit different than your requiremnet.
Follow these useful links
unlimited session timeout?[^]
Keeping ASP.NET Session Open / Alive[^]
how to make login session unlimited?[^]

Hope, it helps :)
 
Share this answer
 
v2
Comments
Krishna Rpr 26-Mar-15 1:01am    
@Suvendu Shekhar Giri: I need session keep alive every time
Suvendu Shekhar Giri 26-Mar-15 1:20am    
Check the updated solution :)
Krishna Rpr 26-Mar-15 1:25am    
Thnx

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