Robustness of session state Mode
Inproc : If the programme (aspnet_wp.exe) is used to recycle resources or applications Program When the domain (appdomain) is restarted, the session state will be lost. This is because the session state is stored in the memory space of an application domain. For configuration files (such as web. config and machine. config) or any changes to the \ bin directory (for example, a new DLL is generated after you use vs to compile the application). For more information, see kb324772. In 1.0, there is also a bug that may cause the Worker Process to restart, but this bug has been fixed in 1.1, see kb321792.
If you are using iis6.0, you can find the application pools/termination parameter in IIS manager.
StateServer : Solved the problem of session state loss in inproc mode. Allows a webfarm to store sessions on a central server. Failure can only occur on the State server.
Sqlserver : Similar to StateServer. The session state data is retained after the SQL server restarts. You can also follow the steps of kb311209 to use the SQL Server failover Cluster
Cause of session loss:
Cause 1:
Files in the bin directory are rewritten. Asp.net has a mechanism. To ensure that the system runs normally after the DLL is re-compiled, it restarts a website process, which will cause session loss, therefore, if an Access database is in the bin directory or other files are rewritten by the system, session loss occurs.
See: http://support.microsoft.com/kb/324772
Cause 2:
In the folder option, if the "Open folder window in a separate process" is not opened, once a new window is created, the system may consider it as a new session and cannot access the original session, therefore, you must enable this option. Otherwise, the session will be lost.
Cause 3:
It seems that most of the session loss is caused by the client, so you have to start from the client to see if the cookie has been opened.
Cause 4:
Is there a problem with the session time settings? Will it be lost due to timeout?
Cause 5:
The maximum number of cookies in IE (20 cookies per domain) may cause session loss.
Cause 6:
Global. asaxOrWeb. configFile changed.
The antivirus software may modify the above files. Do not scan the. asax and. config files. Configuration
Web applications store sessions in out-of-process mode.
See: http://support.microsoft.com/default.aspx? SCID = KB; en-US; q2017148
Cause 7:
The Web garden mode and inproc mode are used to save the session.
See: http://support.microsoft.com/kb/822171
Cause 8:
In ASP. NET, the simulation may be lost when you access the session status under high loads. Microsoft now provides supported fixes.
See: http://support.microsoft.com/kb/324479/zh-cn
Cause 9:
Configuration FileProcessmodelLabelMemorylimitAttribute.
See: http://support.microsoft.com/kb/324772
Cause 10:
This is caused by the maximum number of Web processes in the performance of the IIS6 application pool. Because the session is stored in the Web process by default and the process is too open, the session cannot be shared, each refresh is handled by different processes.
Cause 11:
Use frameset in IE6.
See: http://support.microsoft.com/kb/323752
Refer:
Http://support.microsoft.com/default.aspx? SCID = KB; en-US; q324772
Http://www.zaqi.net/files_view.asp? Files_id = 794
http://support.microsoft.com/default.aspx? SCID = KB; en-US; q1_148