关于 sessionState mode='InProc' 不用启动ASP.NET 服务
2011-09-30 10:13
337 查看
由于Asp.net程序是默认配置,所以Web.Config文件中关于Session的设定如下:
<sessionState mode='InProc' stateConnectionString='tcpip=127.0.0.1:42424' />
我们会发现sessionState标签中有个属性mode,它可以有3种取值:InProc、StateServer?SQLServer(大小写敏感) 。默认情况下是InProc,也就是将Session保存在进程内(IIS5是aspnet_wp.exe,而IIS6是W3wp.exe),这个进程不稳定,在某些事件发生时,进程会重起,所以造成了存储在该进程内的Session丢失。
<sessionState mode='InProc' stateConnectionString='tcpip=127.0.0.1:42424' />
我们会发现sessionState标签中有个属性mode,它可以有3种取值:InProc、StateServer?SQLServer(大小写敏感) 。默认情况下是InProc,也就是将Session保存在进程内(IIS5是aspnet_wp.exe,而IIS6是W3wp.exe),这个进程不稳定,在某些事件发生时,进程会重起,所以造成了存储在该进程内的Session丢失。
相关文章推荐
- How to troubleshoot 'Procedure or function has too many arguments specified' in asp.net 2.0
- Simplified and Extended Data Binding Syntax in ASP.NET 2.0 -- Cont'd
- CS0234 The type or namespace name 'Mvc' does not exist in the namespace 'Microsoft.AspNet' (are you
- hubble.net服务无法启动报错“System.Exception: Hasn't instance name:Default in registry”的解决方法
- [ASP.NET2.0][数据库更新]How to troubleshoot 'Procedure or function has too many arguments specified' in asp.net 2.0
- ASP.NET传到.net4.0版本服务器中的错误 出现:Server Error in '/' Application
- 关于error:Cannot assign to 'self' outside of a method in the init family
- asp.net控制Sql Server服务的启动与停止
- [ASP.NET]WebForms UnobtrusiveValidationMode 需要 'jquery' 的 ScriptResourceMapping。請加入 ScriptResourceMa
- 关于warning: direct base 'A' inaccessible in 'D' due to ambiguity的一些讨论
- asp.net中关于&,双引号和单引号的用法
- ASP.NET-用户'NT AUTHORITY/NETWORK SERVICE' 登录失败的解决方法
- ASP.NET State Service (ASP.NET 状态服务)已启动,并且客户端端口与服务器端口相同。
- 关于eclipse下运行maven build报 No plugin found for prefix 'jetty' in the current project and in the plu gi
- asp.net连接MYSQL出现Character set 'gbk' is not supported的解决方法
- asp.net中关于<% %>、<%= %>的用法
- 关于"net start mysql"提示"服务名无效"的启动mysql方法
- 关于AJAX跨域调用ASP.NET MVC或者WebAPI服务的问题及解决方案
- .net 拼接sql语句 in('xxx','xxx')
- 关于enumeration value 'xxxxx' not handled in switch的警告