Differences between timeout variables

0

I'm working with a web application that performs a Session.Timeout = 30 in code, and it is this part that confuses me, since in the web.config the following configurations are available:

<authentication mode="Forms">
  <forms defaultUrl="Login.aspx" loginUrl="Login.aspx" name="AuthenticationAgeAdmin" protection="None" timeout="60"/>
</authentication>

<sessionState mode="InProc" timeout="60" cookieName="nombreCookie"/>

What is the difference between the different configurations and what is done in code and what would be the best way to configure these times.

I have been reading some cases that report problems with TimeOut but I can not understand these differences.

    
asked by isaac 04.12.2017 в 20:33
source

1 answer

1

The timeout for form indicates how long the cookie will last before it expires. While the timeout for sessionState indicates the time that a value in memory lasts before being recycled and eliminated. For example, you can be authenticated by the session of the cookie but at the time of obtaining the data of the session, you can find null due to the recycling of the memory by InProc .

Note: Mension that saves the session data in memory because you use InProc . There are several ways to save the session data. You can read it in the official documentation

    
answered by 05.12.2017 в 00:51