views:

34

answers:

2

Hey all I have the following in the web.config

<sessionState cookieName="ASP.NET_SessionId" cookieless="false" mode="InProc" timeout="1" regenerateExpiredSessionId="true"/>

however, after 1 min, the session won't expire. what can cause this?

thanks

+2  A: 

I'm assuming you're using forms authentication. Sliding expiration is true by default, so if you look at the slidingExpiration attribute of your web.config forms element you may get the behaviour you're looking for. If false, it will expire after the specified amount of time since it was set.

See:

http://msdn.microsoft.com/en-us/library/1d3t3c61.aspx

ScottE
A: 

Ok. I can't really solve what I want - so if you can please advise me on how to:

I have a page of each every click has ajax call to my server (hence, the ASP extends the session)

I have ASP.NET session set to Xmin. I want when X+1 min expires, I have expiration date. what I did was to set the JS timer to validate every x+1min to see if the session expired (the problem is that the JS and the ASP session timeouts are not synced)

how can I make them be synced.

thanks alot

oshafran
*I have expiration Page
oshafran