Aspnet,Aspnet MVC sessionState StateServer 多IIS共享StateServer
<!--Timeout: 180 minutes--> <system.web> ... <sessionState cookieless="true" timeout="180" stateConnectionString="tcpip=127.0.0.1:42424" mode="StateServer" /> ... </system.web>
若允许远程机器访问本机的 ASP.NET State Service
修改注册表:
Windows Registry Editor Version 5.00 [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\aspnet_state\Parameters] "Port"=dword:0000a5b8 "AllowRemoteConnection"=dword:00000001
AllowRemoteConnection修改为1,修改后,Log off;
若本机名为myPC,其他机上的asp.net程序将
stateConnectionString="tcpip=127.0.0.1:42424"改为
stateConnectionString="tcpip=myPC:42424" 即可访问此StateServer.
Note:确保开启windows的 ASP.NET State Service服务。