Session_End事件不会触发。 [英] Session_End Event does not Fire.

查看:105
本文介绍了Session_End事件不会触发。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我读过的所有文档和讨论表明,除非你在inProc中,否则不应该触发

Session_End。会话状态

模式,然后仅在Session Timeout或Session Abandon上。我需要在会话超时时触发

事件才能捕获并存储日期时间

。但是在我写的应用程序中,我一直无法确认事件发生的任何迹象。我使用了断点,

写入数据库表,并写入文本文件以指示此

事件何时触发。到目前为止,我什么都没有回来。然而,我能够验证会话已经超时的

。我没有任何代码失败的迹象,但是当这个事件发生时,没有任何事情发生
。我真的需要这样,所以

信息将非常受欢迎。


ERJ MCSD MCDBA。

All the documentation and discussion I have read indicate that the
Session_End is not supposed to fire unless you are in "inProc" Session state
mode, and then only on Session Timeout or at Session Abandon. I need the
event to fire at Session timeout in order to capture and store the Datetime
this occurs. However in the application I am writing, I have been unable
discern any indication that the event is firing. I have used break points,
writes to a database table, and writes to a text file to indicate when this
event fires. So far I have got nothing back. Yet I am able to verify the
the session has timed out. I have no indication of code failure, but nothing
happens when this event is supposed to fire. I really do need this so
information would be hugely appreciated.

ERJ MCSD MCDBA.

推荐答案

1)你怎么确定会话确实超时了?

2)你确定你在Session_End中的代码没有失败到期一个

编码错误?

3)向我们展示你的Session_End处理程序的代码


" OldProgrammer" < 01 *********** @ discussions.microsoft.com>在消息中写道

news:95 ********************************** @ microsof t.com ...
1) How are you sure that the session has indeed timed out?
2) Are you sure whatever code you have in Session_End isn''t failing due to a
coding error?
3) Show us the code you have for your Session_End handler

"OldProgrammer" <Ol***********@discussions.microsoft.com> wrote in message
news:95**********************************@microsof t.com...
我读过的所有文档和讨论都表明除非你在inProc中,否则不应该触发Session_End。会话状态
模式,然后仅在Session Timeout或Session Abandon上。我需要在会话超时时触发
事件才能捕获并存储
日期时间。但是在我写的应用程序中,我一直无法识别事件发生的任何迹象。我已经使用了break
积分,
写入数据库表,并写入文本文件以指示
此事件何时触发。到目前为止,我什么都没有回来。然而,我能够验证会话已经超时了。我没有任何代码失败的迹象,但是当这个事件发生时,
没有任何事情发生。我真的需要这样,所以

ERJ MCSD MCDBA。
All the documentation and discussion I have read indicate that the
Session_End is not supposed to fire unless you are in "inProc" Session
state
mode, and then only on Session Timeout or at Session Abandon. I need the
event to fire at Session timeout in order to capture and store the
Datetime
this occurs. However in the application I am writing, I have been
unable
discern any indication that the event is firing. I have used break
points,
writes to a database table, and writes to a text file to indicate when
this
event fires. So far I have got nothing back. Yet I am able to verify the
the session has timed out. I have no indication of code failure, but
nothing
happens when this event is supposed to fire. I really do need this so
information would be hugely appreciated.

ERJ MCSD MCDBA.



OldProgrammer写道:
OldProgrammer wrote:
我读过的所有文档和讨论都表明除非你处于inProc状态,否则不应该触发Session_End会话状态模式,然后只在Session上超时或在会议上放弃。我需要在会话超时时触发事件,以便捕获并存储发生的日期时间。但是在我写的
应用程序中,我一直无法看出事件发生的任何迹象。我使用了断点,写入数据库表,并写入文本文件以指示此事件何时触发。到目前为止,我什么都没有回来。然而,我能够验证会话已经超时了。我没有代码失败的迹象,但是当这个事件发生时没有任何反应。我确实需要这样做,所以非常感谢信息。

ERJ MCSD MCDBA。
All the documentation and discussion I have read indicate that the
Session_End is not supposed to fire unless you are in "inProc"
Session state mode, and then only on Session Timeout or at Session
Abandon. I need the event to fire at Session timeout in order to
capture and store the Datetime this occurs. However in the
application I am writing, I have been unable discern any indication
that the event is firing. I have used break points, writes to a
database table, and writes to a text file to indicate when this event
fires. So far I have got nothing back. Yet I am able to verify the
the session has timed out. I have no indication of code failure, but
nothing happens when this event is supposed to fire. I really do
need this so information would be hugely appreciated.

ERJ MCSD MCDBA.




你没有说明,但是你什么时候期望Session_End发生?
?在最后一次请求这个

会话后,这是20分钟(默认情况下),而不是(很多人都认为)浏览器

关闭或用户导航离开。

Hans Kesting



You didn''t specify, but when do you expect the Session_End to
occur? It''s 20 minutes (by default) after the last request for this
session, not (as a lot of people assume) as soon as the browser
closes or the user "navigates away".

Hans Kesting


除此之外,断点不起作用。 .NET连接到Web应用程序

并监听它为了达到断点而正在做什么。我相信

会保持会话开放。


我会在会话结束时设置对数据库/文本文件的写入

处理程序,将你的会话时间设置为一分钟(或更短),编译

应用程序,在.NET之外手动连接它

http:// localhost / yourappnamehere),然后离开水或汽水。

当你回来时,应该已经发生了写作。


-

此致,


S Justin Gengo,MCP

Web开发人员/程序员

www.aboutfortunate.com


混乱无序。

Nietzsche

" ; Hans Kesting <是ne *********** @ spamgourmet.com>在消息中写道

news:e%**************** @ TK2MSFTNGP12.phx.gbl ...
On top of that setting a breakpoint won''t work. .NET connects to the web app
and listens to what it''s doing in order to hit breakpoints. I believe that
will keep the session open.

I would set a write to a database/text file inside of the session end
handler, set your session time out to one minute (or less), compile the
application, connect to it manually outside of .NET
(http://localhost/yourappnamehere), and then step away for a water or soda.
When you come back the write should have occurred.

--
Sincerely,

S. Justin Gengo, MCP
Web Developer / Programmer

www.aboutfortunate.com

"Out of chaos comes order."
Nietzsche
"Hans Kesting" <ne***********@spamgourmet.com> wrote in message
news:e%****************@TK2MSFTNGP12.phx.gbl...
OldProgrammer写道:
OldProgrammer wrote:
我读过的所有文档和讨论都表明,除非你处于inProc状态,否则不应该触发Session_End会话状态模式,然后只有on会话超时或会话放弃。我需要在会话超时时触发事件,以便捕获并存储发生的日期时间。但是在我写的
应用程序中,我一直无法看出事件发生的任何迹象。我使用了断点,写入数据库表,并写入文本文件以指示此事件何时触发。到目前为止,我什么都没有回来。然而,我能够验证会话已经超时了。我没有代码失败的迹象,但是当这个事件发生时没有任何反应。我确实需要这样做,所以非常感谢信息。

ERJ MCSD MCDBA。
All the documentation and discussion I have read indicate that the
Session_End is not supposed to fire unless you are in "inProc"
Session state mode, and then only on Session Timeout or at Session
Abandon. I need the event to fire at Session timeout in order to
capture and store the Datetime this occurs. However in the
application I am writing, I have been unable discern any indication
that the event is firing. I have used break points, writes to a
database table, and writes to a text file to indicate when this event
fires. So far I have got nothing back. Yet I am able to verify the
the session has timed out. I have no indication of code failure, but
nothing happens when this event is supposed to fire. I really do
need this so information would be hugely appreciated.

ERJ MCSD MCDBA.



你没有说明,但什么时候做你期望Session_End发生吗?在最后一次请求此会话后,这是20分钟(默认情况下),一旦浏览器关闭或用户导航离开,就不会(很多人都认为)。

Hans Kesting



You didn''t specify, but when do you expect the Session_End to
occur? It''s 20 minutes (by default) after the last request for this
session, not (as a lot of people assume) as soon as the browser
closes or the user "navigates away".

Hans Kesting



这篇关于Session_End事件不会触发。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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