To enable the remote session status, we need to configure the Web. config file as follows:
<System. Web>
<Sessionstate mode = "StateServer" stateconnectionstring = "TCPIP = mymachine: 42424"/>
</System. Web>
Note that the mode attribute is case sensitive. The format of the stateconnectionstring attribute is shown below.
Stateconnectionstring = "TCPIP = server: Port"
The server can be either an IP address or a computer name. In the latter case, the string does not support non-ASCII characters. Note that the port number cannot be omitted.
Note: The Status server does not set any authentication barriers for the requester. This indicates that users who can access the network can freely access session data. To protect the session Status, ensure that it can only accept access from web server computers. Therefore, we can use the firewall, IPSec Policy, or network security 10. x, so that external attackers cannot directly access the network. Another security-related policy is to modify the default port settings. To modify the port, it is not enough to set it in the web. config file. You also need to modify the corresponding Registry
Hkey_local_mechine \ System \ current-ControlSet \ Services \ aspnet_state \ parameters.
PS: by default, the status server only listens to local connections. If the status server and web server are different computers, we need to enable remote connection. To do this, we need to edit another registry entry, that is
Allowremoteconnection (the same node as the preceding port) sets it to a non-zero value.
Zookeeper
StateServer provider Configuration