0
A
回答
2
根据您使用的会话类型,然后是,运行在农场可能会导致您的问题。如果负载均衡器或用于在服务器之间分割请求的内容是无状态的,那么它只会将请求转发到任何旧服务器。如果会话数据存储在proc中,那么它将只存储在一台服务器上。如果下一个请求转到另一个服务器,那么会话数据将不再存在。
要做到这一点的最佳方法是使用更智能的负载平衡,它将始终将一个用户请求转发到同一个服务器,或与另一个会话类型(例如独立于Web服务器的sessionServer)一起转发,并且可以提供一致的会话状态到所有Web服务器。
有人说过,我不希望当前会话状态在这些情况下为空,只是空的。我最近在启动看起来无法访问inproc会话状态的新线程的上下文中,自己在空会话间自我调用。
无论这些问题是否有问题,您都很难说,但值得一提的是服务器场的问题,以确保您了解。 :)
相关问题
- 1. HttpContext.Current.Session为空
- 2. HttpContext.Current.Session为空请求图像。为什么?
- 3. 调用异步webservices时HttpContext.Current.Session为空
- 4. ASP.NET HttpContext.Current.Session突然总是为空
- 5. ASP.NET + C#HttpContext.Current.Session为空(里面的WebService)
- 6. HttpContext.Current.Session在路由请求时为空
- 7. WCF + Silverlight的+ HttpContext.Current.Session是空
- 8. 从ASHX处理程序,HttpContext.Current.Session的Sever.Transfer为空
- 9. HttpContext.Current.Session在MVC 3应用程序中为空
- 10. 从温莎迁移到简单的喷油器,HttpContext.Current.Session为空
- 11. 为什么Global.asax中的HttpContext.Current.Session为null?
- 12. HttpContext.Current.Session是mvc
- 13. 使用HttpContext.Current.Session [“Id”]
- 14. HttpContext.current.Session返回Nothing
- 15. HttpContext.Current.Session混淆在Asp.net MVC 3.0
- 16. 页面间销毁HttpContext.Current.Session
- 17. 为什么HttpContext.Current.Session在HttpModule中可用,但在Response.Filter中不可用?
- 18. 将WCF服务中的HttpContext.Current.Session保留为服务调用
- 19. 如果它是空的,我可以通过编程方式创建HttpContext.Current.Session吗?
- 20. HttpContext.current.Session在错误中被清除页面
- 21. Session和HttpContext.Current.Session之间的区别
- 22. 在.NET中强制创建HttpContext.Current.Session
- 23. 当AuthenticationManager.SignOut(DefaultAuthenticationTypes.ApplicationCookie); HttpContext.Current.Session被破坏时。
- 24. ASP.Net状态服务器和访问HttpContext.Current.Session
- 25. 无法检索HttpContext.Current.Session状态的值
- 26. DataReader为空或为空
- 27. SavedInstanceState不为空,但为空
- 28. 为什么HttpContext.Current.Session [“value”]。ToString()在App_Code类文件中给出空值,对象引用未设置为对象的实例
- 29. 在httpcontext.current.session中缓存nhibernate实体是否有意义?
- 30. HttpContext.Current.Session [“list”] == null在Firefox中,但不在IE中
你在哪里得到这个?在一个ASP.net页面? – Paddy 2010-08-20 09:16:22
您能否提供更多信息? – 2010-08-20 09:16:31
我正在ASP.Net页面中获取此。 – 2010-08-20 09:23:50