Click here to Skip to main content
15,892,746 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello Frds I want to Solve Session Request time out Problem. for that i want code that can maintain session that means my session never time out. always live like a gmail.
Posted
Comments
Bojjaiah 11-Dec-13 4:24am    
Can you post your code? what you tried? then we can see what's problem!..
Member 10453691 11-Dec-13 4:29am    
I m not trying anything. i m still searching in the web. Can possible. ? like gmail??
Bojjaiah 11-Dec-13 5:57am    
see below & fallow the link

In web.config

HTML
<httpruntime executiontimeout="360000" />
 
Share this answer
 
v2
Comments
Member 10453691 11-Dec-13 4:14am    
where can i write these code?
jackspero18 11-Dec-13 4:20am    
<system.web>
<httpruntime executiontimeout="360000">
HTML
<system.web><httpruntime executiontimeout="360000" /></system.web>
 
Share this answer
 
Comments
Member 10453691 11-Dec-13 4:47am    
Thnks. i Understand. but now see. what i m doing "on my page load event i get the value from the session and when i refresh page after 5 min that session is going to null so i have to relogin. do u have any suggestion for these.
HI

you can configure to maximum time as 1 year.

It can be accomplished in two ways

in code as
C#
Session.Timeout = 525600;


in config file as
XML
<configuration>
  <system.web>
    <sessionstate timeout="525600" />
  </system.web>
</configuration>


Reference : http://msdn.microsoft.com/en-us/library/system.web.sessionstate.httpsessionstate.timeout(v=vs.110).aspx[^]
 
Share this answer
 
Comments
Member 10453691 11-Dec-13 4:43am    
Thnks. i Understand. but now see. what i m doing

"on my page load event i get the value from the session and when i refresh page after 5 min that session is going to null so i have to relogin. do u have any suggestion for these.
Karthik_Mahalingam 11-Dec-13 4:52am    
if u should not do in page load..
you shld do it in global asax file. in that start method...
Member 10453691 11-Dec-13 4:55am    
k thnks i will try. but if you have any example or any demo then pls. give me...
Karthik_Mahalingam 11-Dec-13 5:12am    
protected void Application_Start(object sender, EventArgs e)
{
Session.Timeout = 30;
}
Member 10453691 11-Dec-13 5:15am    
i have to write these code in asax file and then how can i load asax file to my web. .....
 
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