views:

39

answers:

2

My session keeps timing out in just a few minutes even though I've specified a 200 minute expiry.

In my web.config I've set the timeout for the forms and the sessionState. I've looked at some other similar questions on Stack Overflow but still can't suss this.

<authentication mode="Forms">
  <forms loginUrl="~/Default.aspx" defaultUrl="~/secure/Default.aspx"
    timeout="180"/>      
</authentication>

<sessionState mode="InProc" cookieless="false" timeout="200" />
A: 

Maybe your application gets recycled?

This can be caused by changing web.config files, the contents of the bin folder or by deleting (temp) folders in your application. (and probably there exist other reasons as well)

M4N
in this instance i have done none of those things
Dkong
IIS will also recycle applications based on the configuration for the application pool. There are settings to reset at a particular time, after a certain amount of time has elapsed, and also after a certain number of requests. I would keep at your app pool settings first to rule out application recycling.
Stefan Mohr
A: 

Have you tried to increase the default timeout on the httpRuntime?

Kosala Nuwan
i'm not sure how to do that.
Dkong
<httpRuntime executionTimeout= "3600" /> You may find this tag inside <system.web> tag. More details can be found on http://msdn.microsoft.com/en-us/library/e1f13641(VS.71).aspx
Kosala Nuwan
This timeout is not related with the session-timeout. It specifies the max. duration (in seconds) a *single request* is allowed to run (see here: http://msdn.microsoft.com/en-us/library/e1f13641.aspx).
M4N
@Dkong What is the exception you are getting? a request timeout? do you get redirected to login page?@M4N Justify the downvote!
Kosala Nuwan
M4N, I'm not getting an exception. It is just timing out and returning me to the login page
Dkong