Geeks With Blogs

News

Google My Blog


Murray Gordon Flash a-ah! Savior of the universe...

We have been having some problems with our client application timing out on us.

We have a .NET C# Smart Client that connects to a remote server.
The remote server serves up Remoting Objects over HTTPS to the Smart Client using an IIS .NET 2.0 Web Application.
Our remoted objects have a lifetime leaseTime of 0 or “forever”.

        <lifetime leaseTime="0"/> 

But for some reason our user’s kept getting timed out after 20 minutes.

Finally we figure out that our ASP.NET web application has a default timeout of 20.

Here is the parameter for the web.config that controls the ASP.NET timeout:

        <sessionState timeout="45"/> 

The number for the timeout must be an integer, and it is in minutes.  What we found in our project was that unless the web.config had a parameter setting the time to keep an ASP.NET session alive it would terminate it after 20 minutes and the app would throw exceptions.

The parameter goes anywhere within the <system.web> portion of the configuration section of web.config.  Hopefully that will help anyone else having this type of problem.

Thanks,
Murray

Headshot

Posted on Friday, July 7, 2006 11:57 AM .NET Framework 2.0 | Back to top


Comments on this post: ASP.NET Session State timeout

# re: ASP.NET Session State timeout
Requesting Gravatar...
Keep us posted on how it ends up Murray...I experienced this same thing (15 - 20 minute Session loss for no reason) about a year ago on the project...I'm pretty sure that we tried setting the SessionState timeout as well but it was a year ago and I can't be sure. Very curious if this will solve the issue.

D
Left by D'Arcy from Winnipeg on Jul 07, 2006 7:27 PM

# re: ASP.NET Session State timeout
Requesting Gravatar...
AFAICT, this sessionState timeout setting seems to be a placebo. Could it be that an individual web application's setting is getting stomped on by the server itself? We have ours set to 60 but sessions are still dying at 20 minutes. I sense that something untoward is happening.
Left by Allen on Nov 29, 2007 11:58 AM

# re: ASP.NET Session State timeout
Requesting Gravatar...
I have set timout 3 minutes.

sessionstate mode="Inproc" coockieless = "false" timeout="3"

this is my sesstion state. thogh my session variables do not expires after 3 minutes.....

pls give me solutions
Left by Vimal Rupera on Dec 17, 2007 2:40 AM

# re: ASP.NET Session State timeout
Requesting Gravatar...
Look at your IIS settings. I am a novice at this, but to change my timeouts I had to make some server side changes as well.

IIS->Directory->Config->Options

and AppPool->Properties
Left by sean on Feb 13, 2008 9:23 AM

# re: ASP.NET Session State timeout
Requesting Gravatar...
here's what my hoster (http://www.asphostcentral.com) did to my website.

They did inform me to check the IIS settings - right click -> Properties - on the "Website" tab, increase the default timeout seconds to more than 120 secs.

Furthermore, they also advised me NOT to use session variables in a shared hosting environment. Things might happen in a shared hosting environment, such as an inifinite loop on the other customer's sites may bring bad luck to my site as well as I am sharing the same IIS server and pool.

They, instead, recommend me to use cookie. I researched and found big companies like Ebay or Yahoo also did use cookie.

any comment?

overall, I am quite happy with their explaination...!
Left by Lisa Barley on Jun 24, 2008 12:48 AM

# re: ASP.NET Session State timeout
Requesting Gravatar...
thanks for the info, my problem solved.
Left by Denny on Dec 05, 2008 11:49 PM

# re: ASP.NET Session State timeout
Requesting Gravatar...
I have a problem of State session, it's randomly timeout before 20 minutes. It doesn't happened all the time but sometimes it gives the timeout while they still active, working on something and it doesn't happened to everyone. I check everything but not sure why. Please Help and advise.

Thank you so much!
Left by Sydney on Apr 22, 2009 11:56 AM

# re: ASP.NET Session State timeout
Requesting Gravatar...
I have set timout 3 minutes.

sessionstate mode="Inproc" coockieless = "false" timeout="1"

this is my sesstion state. thogh my session variables do not expires after 1 minutes.....

pls give me solutions
Left by chandra on Jul 15, 2009 1:39 AM

# re: ASP.NET Session State timeout
Requesting Gravatar...
Just as a side note, you may check the Idle Time-out setting for the application pool. If the site goes idle (i think default of 5 min) then the application pool shuts down to save server resources. This will kill a session as well. Try increasing the Idle Time-out for the application pool to see if this helps at all.
Obviously if you are in a shared hosting environment you will most likely not be able to adjust this.
Left by Branden on Aug 21, 2009 6:51 AM

# re: ASP.NET Session State timeout
Requesting Gravatar...
Thanks for the info.

www.mydiscreteplace.com
(Free dating and social networking site)
Left by Rishi on Aug 30, 2009 3:42 PM

# re: ASP.NET Session State timeout
Requesting Gravatar...
Hi,

I frequently get the "max pool size reached" - error in our application.

What isthe best possible solution for this. i have set the max pool size to 100 in the web.config, it still gives the error.

- And i set the min pool size to 0, is it important to set the min pool size to a certain value.

Please advice
Left by asha on Sep 14, 2009 1:32 AM

# ASP.NET Session State timeout
Requesting Gravatar...
i need session state source code some reason our user’s kept getting timed out after 20 minutes
then again login the person validate session values how will do this most urgent
Left by kumar on Jul 10, 2010 7:29 AM

# re: ASP.NET Session State timeout
Requesting Gravatar...
Hello, In my case, we have our application in the shared hosting server. Now as per you said I use the sessionState parameter <sessionState timeout="600"/>. Still the session is terminating in 20 mins. Can u help me out please that how can I manage sessionState on Shared Hosting server ??

Thanks in Advanced.
Left by DShahu on May 12, 2011 8:34 AM

# chup be
Requesting Gravatar...
Hi how r u?
Left by pappu kumar on Oct 20, 2011 7:03 AM

# re: ASP.NET Session State timeout
Requesting Gravatar...
kindly go through this web site its good one
Left by mady on Nov 30, 2011 11:10 PM

# re: ASP.NET Session State timeout
Requesting Gravatar...
ASP.NET web application has a default timeout of 20.
<sessionState timeout="45"/>
The number for the timeout must be an integer, and it is in minutes. What we found in our project was that unless the web.config had a parameter setting the time to keep an ASP.NET session alive it would terminate it after 20 minutes and the app would throw exceptions.
Left by Shyam Narayan Pandey on Dec 22, 2011 3:40 AM

Your comment:
 (will show your gravatar)
 


Copyright © Murray Gordon | Powered by: GeeksWithBlogs.net | Join free