丢失会话变量 [英] Lose Session Variables

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

问题描述

我一直在我的asp.net应用程序中使用会话变量而没有任何问题。但现在在一个非常具体的案例中,我正在失去它们。在我的一个页面上,我在下拉列表中设置了一个日期(autopostback = false),然后单击构建按钮。构建报告的按钮。大多数时候没有问题。但有时会发生以下情况。我单步执行代码没问题,会话变量不会改变。但是,在下次单击鼠标后进行检查时,会话变量为GONE!它与时间或防病毒保护无关。任何想法


谢谢


Michael

I have been using session variables in my asp.net application without any trouble. But now in a very specific case I am losing them. On one of my pages I set a date in a dropdownlist (autopostback=false) and then click a "Build" button which builds a report. Most of the time there is no problem. But sometimes the following happens. I step through the code no problem, the session variables do not change. But, when examined after the the next mouse click, the session variables are GONE! It has nothing to do with time or antivirus protection. Any ideas

Thanks

Michael

推荐答案

检查输出sessionid值以确保会话更改...


AFAIK如果应用程序自动重启服务器也会发生这种情况

side ...


Patrice


-


" Michael SL" < MI ***************** @ compuware.com> a ??? crit dans le message de

新闻:D7 ******************************* *** @ microsof t.com ...
Check out the sessionid value to make sure the session changed...

AFAIK it can happens also if the application automatically restarted server
side...

Patrice

--

"Michael SL" <mi*****************@compuware.com> a ??crit dans le message de
news:D7**********************************@microsof t.com...
我一直在我的asp.net应用程序中使用会话变量而没有任何
的麻烦。但现在在一个非常具体的案例中,我正在失去它们。在我的一个
页面上,我在下拉列表中设置了一个日期(autopostback = false),然后点击

" Build"构建报告的按钮。大部分时间没有问题。

但有时会发生以下情况。我单步执行代码没问题,

会话变量不会改变。但是,在下一次单击鼠标后检查后,会话变量为GONE!它与时间无关

或防病毒保护。有什么想法吗?
谢谢,

迈克尔
I have been using session variables in my asp.net application without any trouble. But now in a very specific case I am losing them. On one of my
pages I set a date in a dropdownlist (autopostback=false) and then click a
"Build" button which builds a report. Most of the time there is no problem.
But sometimes the following happens. I step through the code no problem,
the session variables do not change. But, when examined after the the next
mouse click, the session variables are GONE! It has nothing to do with time
or antivirus protection. Any ideas?
Thanks,

Michael






你会发布一些代码,以便我们看到发生了什么?
Will you post some code so we can see what is going on?


已添加信息


我正在使用Visual Studio。我设置了一些断点。当我点击断点时,我点击断点填充圆圈指示符,它变成空圆圈(意味着断点暂时被禁用此执行)。现在,代码不断地通过禁用的断点,直到我将TheStartDate设置为某些特定值并执行Build。下次代码点击断点时它会停止。这表明Visual Studio确实进行了重置。但为什么我不知道。如前所述,现在不是时候。我没有看到任何导致它的代码。我只是没有得到它


Michae


----- Michael SL写道:----


我一直在我的asp.net应用程序中使用会话变量而没有任何麻烦。但现在在一个非常具体的案例中,我正在失去它们。在我的一个页面上,我在下拉列表中设置了一个日期(autopostback = false),然后单击构建按钮。构建报告的按钮。大多数时候没有问题。但有时会发生以下情况。我单步执行代码没问题,会话变量不会改变。但是,在下次单击鼠标后进行检查时,会话变量为GONE!它与时间或防病毒保护无关。任何想法


谢谢


Michael
Added informatio

I am using Visual Studio. I have set up some breakpoints. When I hit the breakpoints I click on the breakpoints filled circle indicator and it turn into the empty circle (meaning that the breakpoint is temporarily disabled for this execution). Now, the code continually passes over the disabled breakpoint until I set TheStartDate to some particular values and perform a Build. The next time the code hits the breakpoint it stops. This indicates that Visual Studio did do a reset. But why I have no idea. As stated before, it is not time. I do not see anything it the code which would cause it. I just don''t get it

Michae

----- Michael SL wrote: ----

I have been using session variables in my asp.net application without any trouble. But now in a very specific case I am losing them. On one of my pages I set a date in a dropdownlist (autopostback=false) and then click a "Build" button which builds a report. Most of the time there is no problem. But sometimes the following happens. I step through the code no problem, the session variables do not change. But, when examined after the the next mouse click, the session variables are GONE! It has nothing to do with time or antivirus protection. Any ideas

Thanks

Michael


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

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