码迷,mamicode.com
首页 > 系统相关 > 详细

进程外Session

时间:2015-03-16 19:01:22      阅读:172      评论: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
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!