您当前的位置: 首页 > 

Session短时间内丢失处理

发布时间:2009-06-10 21:11:00 ,浏览量:0

Session Data Is Lost When You Use ASP.NET InProc Session State Mode
 
SYMPTOMS
Session data for ASP.NET Web applications appears to be lost at random intervals for the InProc session state mode.
CAUSE
Session state data is lost if the AppDomain or the Aspnet_wp.exe process (or the W3wp.exe process, for applications that run on Microsoft Internet Information Services [IIS] 6.0) is recycled. Generally, the AppDomain is restarted based on several factors:   Various attributes (for example, the memoryLimit attribute) have particular settings in thesection of the configuration file.   The Global.asax or the Web.config file was modified.   The Bin directory of the Web application was modified.   Virus scanning software touched some .config files.For additional information, click the article number below to view the article in the Microsoft Knowledge Base:
316148( http://support.microsoft.com/kb/316148/EN-US/) PRB: Session Variables Are Lost Intermittently in ASP.NET Applications
InProc session mode indicates that session state is stored locally. This means that with InProc session state mode is actually stored as life objects in the AppDomain of the Web application. This is why the session state is lost when Aspnet_wp.exe (or W3wp.exe, for applications that run on Microsoft Internet Information Services [IIS] 6.0) or the AppDomain restarts.
 
RESOLUTION
To work around this problem, you can use StateServer or SqlServer session state mode. ASP.NET provides these other approaches for storing session state data. In the StateServer and SqlServer modes, your session state is not stored in the AppDomain of the Web application. Note It is important to understand the behavior and the issues that are associated with each session state mode when you decide which mode is appropriate for your requirements. For more information, see the "References" section of this article. 原文: http://support.microsoft.com/default.aspx?scid=kb;EN-US;q324772

关注
打赏
1688896170
查看更多评论

暂无认证

  • 0浏览

    0关注

    106485博文

    0收益

  • 0浏览

    0点赞

    0打赏

    0留言

私信
关注
热门博文
立即登录/注册

微信扫码登录

0.0486s