只要改改web.config配置即可
<system.web>
<sessionState mode="StateServer" //系统默认的为“inproc” 将其改为StateServer即可
stateConnectionString="tcpip=127.0.0.1:42424"
sqlConnectionString="data source=127.0.0.1;Integrated Security=SSPI" cookieless="true" timeout="60"/>
一定要注意将“服务”中的ASP.NET state service启动
ASP.NET SessionState 配置
本文介绍如何通过修改 web.config 文件中的 <system.web> 部分来配置 ASP.NET 的 SessionState 为 StateServer 模式。具体包括设置 stateConnectionString 和 sqlConnectionString 参数,同时调整 session 的 cookieless 和 timeout 属性。
518

被折叠的 条评论
为什么被折叠?



