首页 > 系统服务 > 详细

进程外Session

时间:2015-03-16 19:00:17      阅读:332      评论:0      收藏:0      [点我收藏+]

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>

 

进程外Session

原文:http://www.cnblogs.com/ianism/p/4342395.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!