会话变量定期返回null [英] Session Variables periodically return null

查看:88
本文介绍了会话变量定期返回null的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个Web应用程序(VS 2005/.Net v 2.050727),该应用程序使用会话变量来存储数据集.我正在使用在某些列中具有链接按钮的网格.当我单击链接时,它将打开另一个访问会话变量的浏览器窗口.有时会话变量具有值,有时它将返回null.任何想法?????????

I have a web app (VS 2005 / .Net v 2.050727) that uses a session variable to store a dataset. I''m using a grid that has link buttons in some of the columns. When I click on a link it opens another browser window that accesses the session variable. Sometimes the session variable has a value and sometimes it will return null. Any ideas?????????

推荐答案

取决于系统的配置,有几个原因可以回收应用程序的工作进程因此消除了所有存储的会话变量.请查看我对这个问题的解决方案:对象参考未设置为对象实例 [ ^ ].还请查看此解决方案的注释.这应该给您一些想法.

希望这会有所帮助!

最好的问候,
—MRB
Depending on the configuration of your system there are several reasons for the application''s worker process to be recycled thus eliminating all stored session variables. Please see my solution to this question: object reference not set to instance of object[^]. Also look into the comments of this solution. This should give you some ideas.

Hope this helps!

Best Regards,
—MRB


这篇关于会话变量定期返回null的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆