c# - Time-out expires faster than expected - ASP.NET -


i have application that's working well, but, when stay short time without interactions @ page, authentication goes down , return login page. i'm trying set 20 minutes or more on web config.

<authentication mode="forms">   <forms loginurl="~/login.aspx" timeout="20" /> </authentication>  <sessionstate timeout="20"></sessionstate> 

...

<customerrors mode="off" />     <machinekey decryptionkey="autogenerate,isolateapps" validationkey="autogenerate,isolateapps" /> 

on app settings

<add key="aspnet:maxhttpcollectionkeys" value="2000" /> 

i saw in iss, tried follow steps found here , on microsoft community session continues expire faster want.

is sessionstate inproc? if is, recycling on application pool clear session. caused rebuilding application, multiple settings in iis. suggest go stateserver or sqlserver sessionstate if want session persist longer.

if don't want change sessionstate, @ settings on app pool:

  1. open iis
  2. choose application pools
  3. right click application pool , select advanced settings
  4. find idle time-out (minutes) , increase bigger value.

Comments