ASP.NET - Session Time

In the file web.config

for my application <sessionState>

under I have set timeout="60"

(in minutes), but the session state variables in my application seem to expire after about 1 minute. Any idea what might be causing this?

+2


source to share


2 answers


Yes.

Session timeouts are also set and controlled by IIS (although there is a match). In IIS 6.0, you also need to check the following places in IIS Manager (virtual directory properties):

  • ASP.net tab> Modify Configuration> Authentication tab> Cookie Timeout
  • ASP.net tab> Edit Configuration> Public Administration tab> Session Timeout


Setting all of these values ​​to the same value fixed the problem for me.

edit: Apparently the previously mentioned first option had nothing to do with this. This means that the first of the two options is where you can fix the session timeout. It probably isn't your session timeout, but the authentication expiration.

Or another possibility is that the workflow is restarted or the application is restarted. Also things to look at.

+1


source


If you store the session state "in proc", then every time you reuse the application pool, you might lose the session (this can happen on a server with low memory). You can try to persist the session state "from proc" using State Server or SQL Server.



See PRB: Session Data Lost When Using ASP.NET InProc Session State Mode

+1


source







All Articles