Click here to Skip to main content
15,898,373 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
The Default time out is 20 minutes, but I would like to increase session time to 8 hour because the user is entering information into a web form, the session time-out period will end and they lose all the work they have done.

Every time they have to logged into application again and again due to that lost the information..

Regards
Prince Antony G
Posted
Updated 16-Nov-11 22:37pm
v13
Comments
Prince Antony G 17-Nov-11 4:48am    
I have tried all those suggestion... but unable to clear my issue..

Check it in IIS.
Open the IIS, click on the Application Pools, Select the Application pool for your application.
Right Click --> Select Properties.
In the Performance tab, Set the idle timeout as your desired minutes for "shutdown worker processes after being idle for ..... minutes".

Restart IIS after that.
 
Share this answer
 
Comments
Prince Antony G 12-Nov-11 2:04am    
i have tried this also..
koolprasad2003 12-Nov-11 2:11am    
when your timeout occoured ?
if the application is idle or when you traveling through code
Prince Antony G 12-Nov-11 2:52am    
while working itself.
Asp.Net Session Management has two Modes.

InProc

Loss of Session is a common problem in this mode. IIS keep recycling the worker-process after some duration, which causes the loss of Session Data.

Have a look at below link for more informaton on this.

http://blogs.iis.net/webtopics/archive/2009/07/21/in-proc-session-state-management.aspx

Below CodeProject article has a work-around for this problem.
Prevent Session Timeout in ASP.NET

OutProc

In this mode of Session Management, settings of web.config will work properly. Have a look at below link for more details.

http://msdn.microsoft.com/en-us/library/h6bb9cz9(v=VS.100).aspx
 
Share this answer
 
You need to increase session timeout in WEB.CONFIG file. the default session timeout time is 20 min. Set timeout in Minutes

HTML
<configuration>
  <system.web>
     <sessionstate timeout="20" /> 
  </system.web>
</configuration> 
 
Share this answer
 
Comments
Prince Antony G 12-Nov-11 1:50am    
i have tired this...
koolprasad2003 12-Nov-11 1:54am    
Have you tried with SESSIONSTATE timeout="60"
Prince Antony G 12-Nov-11 2:04am    
yeah i have tried that also..but still unable to solve...
SQL
Open the IIS, click on the Application Pools, Select the Application pool for your application.
Right Click --> Select Properties.



set the time which u want
 
Share this answer
 
You can do the same from IIS and from web config file as well, anywhere which is suitable for you,

From IIS :
C#
Open the IIS, click on the Application Pools, Select the Application pool of your application.Right Click on it, Select Properties.In the Performance tab, Set the idle timeout.


Fron WebConfig :

C#
<configuration>
  <system.web>
     <sessionstate timeout="20" /> 
  </system.web>
</configuration>

By default its 20 mins. Change it as per your needs.
 
Share this answer
 
hi, do u fix up d issue u face?? currently i also face this issue. If u have solution can share it to me?
 
Share this answer
 
Comments
Prince Antony G 6-Jun-12 4:35am    
no i didnt got any solution..
SQL
Open the IIS, click on the Application Pools, Select the Application pool for your application.
Right Click --> Select Properties.
In the Performance tab, Set the idle timeout as your desired minutes for "shutdown worker processes after being idle for ..... minutes".
 
Share this answer
 
if it is timedOut while working it self, then check following points

1. have you use web services in your code ?
2. have you create any directory using your code ?
 
Share this answer
 
Comments
Prince Antony G 14-Nov-11 0:21am    
yeah i m using webservices,but not create any directory..
Reload an iframe on your page every few minutes using javascript. This will prevent session timeout. Make sure the page you load in the iframe is aspx, returns something different (maybe just the current time) on every load and that the request parameters are different each time.
 
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