Preventing Multiple Logins in ASP.NET
2004-03-31 00:41
531 查看
http://www.eggheadcafe.com/articles/20030418.asp
We talked about the fact that the classic ASP Session_OnEnd handler is widely known to be pretty unreliable. However, in ASP.NET the corresponding Global class handler, Session_End, is very reliable. Then we talked about "what if" scenarios, such as what if the ASP.NET worker process was recycled? If so, I reasoned, it didn't matter whether you were using Session, Application or Cache, all of your stuff would be lost. The only exceptions to this would be if you were using the ASP.NET State Server service for your Session, or the SQL Server Session option. In particular, there is a second script available for the SQL Server Session option that does not use the TempDB, and this means that even if the whole machine goes down, when it comes back up, the Session data will still be there. Both StateServer and SQL Server Session options run out of process, so it really doesn't matter if the ASPNET_WP.EXE worker process is recycled - the sessions, which run out of the ASP.NET worker process and rely on the Session Cookie that's stored at the browser, will still be there.
We talked about the fact that the classic ASP Session_OnEnd handler is widely known to be pretty unreliable. However, in ASP.NET the corresponding Global class handler, Session_End, is very reliable. Then we talked about "what if" scenarios, such as what if the ASP.NET worker process was recycled? If so, I reasoned, it didn't matter whether you were using Session, Application or Cache, all of your stuff would be lost. The only exceptions to this would be if you were using the ASP.NET State Server service for your Session, or the SQL Server Session option. In particular, there is a second script available for the SQL Server Session option that does not use the TempDB, and this means that even if the whole machine goes down, when it comes back up, the Session data will still be there. Both StateServer and SQL Server Session options run out of process, so it really doesn't matter if the ASPNET_WP.EXE worker process is recycled - the sessions, which run out of the ASP.NET worker process and rely on the Session Cookie that's stored at the browser, will still be there.
相关文章推荐
- Visual Studio .NET已检测到指定的WEB服务运行的不是ASP.NET 1.1版
- ASP.NET 数据库缓存依赖
- 第一次来,试发一帖!--ASP.NET 2.0 中的SqlCacheDependency特性
- 在ASP.NET中使用字符编码
- datagrid分页《非控件版》
- datagrid分页问题(前后跳页)《控件版继承usercontrol》
- Asp.net 工程调试注意事项
- ASP.NET分页组件更新版本
- [ASP.NET] 将Session值储存于SQL Server中.
- asp.net不要Windows认证,自定义基于数据库的安全认证
- 关于在安装ASP.NET Forum中出现的无法排序的问题.
- DataGrid Web控件深度历险(2) Part2
- DataGrid Web控件深度历险(2) Part1
- 在asp.net中使用excel模板
- DataGrid Web控件深度历险(1)
- ASP.NET Popup Control
- Asp.net性能优化总结(一)
- 在ASP.NET中用MSDNURLRewriting实现Url Rewriting
- 关于ASPNET在IIS一些问题的经验总结
- 认识Whidbey