After the website is uploaded to the server, the logon times out when users log on! Or no result is returned in the session detection ....
Set the session in the web. config file as follows:
<Sessionstate mode = 'stateserver 'stateconnectionstring = 'tcpip = 127.0.0.1' sqlconnectionstring = 'data source = 127.0.0.1; trusted_connection = Yes 'cookieless = 'true' timeout = '60'/>
At the same time, set "ASP. NET Status Service" in the service to auto-Enable. In this way, the session does not depend on a process.
Another method is to save the session to the sqlserver database.
Appendix:
By default, the session settings in the web. config file are as follows:
<Sessionstate mode = 'inc' stateconnectionstring = 'tcpip = 127.0.0.1 'sqlononstring = 'data source = 127.0.0.1; trusted_connection = Yes 'cookieless = 'true' timeout = '60'/>
The sessionstate tag has an attribute mode, which can be inproc, StateServer, or sqlserver (case sensitive ). The process is unstable. When some events occur, the process restarts, causing the loss of sessions stored in the process.