标签:
StateServer的进程外Session
需要提前在服务中开启ASP.NET State Service服务
然后web.config中进行配置
<configuration> <system.web> <compilation debug="true" targetFramework="4.5" /> <httpRuntime targetFramework="4.5" /> <sessionState stateConnectionString="tcpip=127.0.0.1:42424" mode="StateServer"></sessionState> //这是具体配置 </system.web> </configuration>
SQLServer的进程外Session
需要提前在VS开发人员命令行中进行配置
aspnet_regsql -U 数据库登陆用户 -P 登陆密码 -ssadd -sstype c -d 数据库名称
然后web.config中进行配置
<configuration> <system.web> <compilation debug="true" targetFramework="4.5" /> <httpRuntime targetFramework="4.5" /> <sessionState sqlConnectionString="server=.;database=SessionDB;uid=sa;pwd=123456;" mode="SQLServer" allowCustomSqlDatabase="true"></sessionState> //具体配置 </system.web> </configuration>
标签:
原文地址:http://www.cnblogs.com/ianism/p/4342395.html