wiki
Benvenuto Ospite, sei in: Login
RSS RSS

Navigazione (Tech)





Ricerca wiki
»
Quick summary of the different modes of session state

<sessionState mode="StateServer" stateConnectionString="tcpip=localhost:42424" cookieless="false" timeout="20"/>

Possible mode switches

Storage location

  • InProc - session kept as live objects in web server (aspnet_wp.exe). Use "cookieless" configuration in web.config to "munge" the sessionId onto the URL (solves cookie/domain/path RFC problems too!)
  • StateServer - session serialized and stored in memory in a separate process (aspnet_state.exe). State Server can run on another machine
  • SQLServer - session serialized and stored in SQL server

Performance

  • InProc - Fastest, but the more session data, the more memory is consumed on the web server, and that can affect performance.
  • StateServer - When storing data of basic types (e.g. string, integer, etc), in one test environment it's 15% slower than InProc. However, the cost of serialization/deserialization can affect performance if you're storing lots of objects. You have to do performance testing for your own scenario.
  • SQLServer - When storing data of basic types (e.g. string, integer, etc), in one test environment it's 25% slower than InProc. Same warning about serialization as in StateServer.

More on http://msdn2.microsoft.com/en-US/library/ms178586.aspx