Use asp.net state service

1. Profiles   

      <configuration>    

        <system.web>  

          <sessionState timeout="20" mode="StateServer" stateConnectionString="tcpip=192.168.0.122:42424"></sessionState>               

        </system.web>

      </configuration>

Note:

  • Port number must be 42424  
  • This embodiment is a remote, if a machine can be localhost or 127.0.0.1, remote need to change the registry  
  • StateServer mode is represented using a state server to store Session  
  • timeout set an expiration time of 20 minutes

2. Modify the registry:  

  1. regedit to open the registry editor  
  2. HKEY_LOCAL_MACHINE->SYSTEM->CurrentControlSet->services->aspnet_state->Parameters  
  3. AllowRemoteConnection: The default is 0 allow access to the machine, you can remotely access to 1

3. Note that the conversion if there is a firewall, you need to open ports 42424, 42424 decimal, hexadecimal necessary in some places.

Reproduced in: https: //www.cnblogs.com/liuming8080/archive/2013/01/10/2853961.html

Guess you like

Origin blog.csdn.net/weixin_34259159/article/details/93306967