Click here to Skip to main content
16,019,043 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I'm changing my session time out to 180 min. But whenever I change it automatically got time out after 10 min.

I don't know from where its taking 10 min value.

I have already tried with global.asax but I'm only able to reduce the time don't know why I can not increase the time out.

It's my session state tag in web.config

XML
<sessionState mode="InProc" customProvider="DefaultSessionProvider" timeout="180">
       <providers>
       <add name="DefaultSessionProvider" type="System.Web.Providers.DefaultSessionStateProvider, System.Web.Providers, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" connectionStringName="DefaultConnection" />
     </providers>

   </sessionState>




Please advice........
Thanks in advance.
Posted
Comments
ZurdoDev 6-May-15 13:48pm    
How do you know you are timing out?
Member 9792406 7-May-15 11:00am    
After 10 min my site kicked out me by saying session has timed out.
ZurdoDev 7-May-15 11:02am    
Can you be more clear? A site will not kick you out. You have to do something from the client side to even know your session is gone. You have to try to postback or do something.

1 solution

It's quite possible that your web hosting service is restricting the session timeout to 10 minutes - since each active session takes server memory which has to be retained until the session expires, it's quite common for some hosting services to restrict it to less than the standard 20 minutes. Extending each session to 180 minutes could occupy a significant amount of server resources, which hosts would like to avoid.

Either talk to your hosting service, or better stop using the session and use Cookies instead.
 
Share this answer
 
Comments
Member 9792406 7-May-15 11:01am    
Thanks for your help. I will try to confirm the hosting service provider.
OriginalGriff 7-May-15 11:16am    
You're welcome!

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