v s
v s

Reputation: 559

asp.net does session info lost if application restarts if stored on SQL SERVER

We are thinking for moving our sessions from memory to sql server (using web.config session mode setting).

Will it work the same way as it does with in memory or our users will be able to retain their session even if the application recycles? What about cache?

Upvotes: 1

Views: 226

Answers (1)

Waqar Janjua
Waqar Janjua

Reputation: 6123

Session State Service or Sql Server mode retains session values if the web application restarts. Cache will be removed if the web application restarts.

  1. Sql Server mode stores session data in sql server database (persistent).
  2. State Service stores session data in memory, on a separate (possibly remote) process, referred to as the ASP.NET state service, that is separate from the ASP.NET worker process or IIS application pool.
  3. Cache is stored in ASP.NET worker process memory.

Upvotes: 5

Related Questions