views:

184

answers:

1

I have an ASP.NET web application that uses Forms Authentication. In the web.config, the forms authentication timeout value is set to "20" (which I understand to be 20 minutes).

We're seeing an issue where you'll be interacting with the site..(i.e. clicking on linkbuttons, performing postbacks, etc.) and randomly get sent back to the Login page to authenticate.

It seems like the timeout is being obeyed, but activity is not restarting the counter.

Any ideas where to look or how to debug this?

+3  A: 

check slidingExpiration in web.config and make sure it's set to true

<authentication mode="Forms">

    slidingExpiration="true" />
</authentication>

also is this load balanced web site? make sure session information is out of process, or use sticky session.

Hussain Saleem
The attribute is not defined in my web.config and its default value is true. Also, yes, this is in a load balanced environment, but we don't use session and there is currently only one server in the pool.
Matthew
If you don't own the code base, look for anything that will alter the cookie value or possible that FormsAuthentication.SignOut() is getting called somewhere
Hussain Saleem
There are no obscure calls to SignOut() and we don't alter the value of the cookie.
Matthew
I can't think of anything else beside debugging, trace, check machine configu. However I would probably add the slidingExpiration attribute to the config file. good luck
Hussain Saleem