ASP.net's session mode InProc changed to StateServer, the site can not be accessed
<sessionstate mode= "InProc" cookieless= "false" timeout= "/>"
I changed the InProc to StateServer, the website is not accessible, and my WAP site is C #. Database sql2000, want to implement a session is not period of conversation, timeout changed, seems to not work
Session mode several states
When developing asp.net applications, modify the sessionstate nodes in the web.config.
StateServer mode: <sessionstate mode= "StateServer" stateconnectionstring= "tcpip=127.0.0.1:42424" sqlconnectionstring= "Data source=127.0.0.1; Trusted_connection=yes "cookieless=" false "timeout="/>
<sessionstate mode= "StateServer" stateconnectionstring= tcpip=127.0.0.1:42424 "sqlConnectionString=" data source=127.0.0.1; Trusted_connection=yes "cookieless=" false "timeout="/> InProc mode: <sessionstate mode= "InProc" stateconnectionstring= "tcpip=127.0.0.1:42424" sqlconnectionstring= "Data source=127.0.0.1; Trusted_connection=yes " cookieless=" false "timeout="/>
<sessionstate mode= "InProc stateconnectionstring=" tcpip=127.0.0.1:42424 "sqlconnectionstring=" Data source= 127.0.0.1; Trusted_connection=yes "cookieless=" false "timeout="/> InProc mode benefits: Gets the session state faster, and it is stored directly in the IIS process. Disadvantage: Easy to lose, often need to login
StateServer Mode Benefits: Session state is stored separately in a process and does not lose state disadvantage because of the restart of IIS or applications: getting session state is slower than InProc. After all, there are two different processes. &NBSP
When developing, a little modification to the application will cause the application to restart, at which point if you use the InProc mode, you need to log in again, which is a waste of time. It is recommended that StateServer mode be used. and set the timeout longer in IIS.
Note: When using StateServer mode 1, to turn on the "ASP.net State Service" (set to "automatic") status service
2, If the value of stateconnectionstring is not a value that represents a local address, such as 127.0.0.1 or localhost, you need to modify the registry: Hkey_local_machine\system\currentcontrolset\ Services\aspnet_state \parameters node → set allowremoteconnection key value to "1" (1 to allow remote computer connection, 0 is forbidden) → Set port (port number)
3, session If the violation throws a cannot serialize session state. In either "StateServer" or "SQL Server" mode, ASP.net will serialize the session-state object, so objects that cannot be serialized or MARSHALBYREF objects are not allowed. The same restriction applies if the custom session state store performs a similar serialization in custom mode. Such an exception. If you store a custom object to the session, you must add a [Serializable] comment to the object's class.