会话结束后识别用户 [英] Identify User After Session Ends

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

问题描述

我正在为用户构建一个Web应用程序来添加/编辑数据。他们可以在会话期间添加/编辑
几个记录。

完成后(不一定立即,可能是10分钟或更长时间)
稍后),我需要发送一封电子邮件,其中包含

添加/编辑的摘要信息。

我可以使用sessionid或user'跟踪记录登录,但

如何确定何时发送电子邮件以及用户是谁以来

是否在session_end事件中没有可用的会话信息?


这将在商业网络服务器上,因此计划任务不是一个选项。

是否有一些循环活动会话的方法

应用程序级别,以便我可以将活动的sessionid'(或会话

变量)与编辑时保存到db的那些进行比较?


TIA


-


Alphonse Giambrone

电子邮件:a-giam at customdatasolutions dot us

解方案
"阿尔基安布郎" < NO ********** @ example.invalid>写在

新闻:Ob ************** @ TK2MSFTNGP14.phx.gbl:

我可以跟踪通过使用sessionid或用户的登录记录,但是如何确定何时发送电子邮件以及用户是谁,因为session_end事件中没有可用的会话信息? / blockquote>


您可以启动新线程来完成数据库工作,然后在线程完成后发送e-

邮件?


-

Lucas Tam(RE********@rogers.com)

请删除删除 ;来自回复时的电子邮件地址。
http://成员。 ebay.com/aboutme/coolspot18/


感谢Lucas的回复。

我不太明白。每次用户

编辑记录时,我都不想发送电子邮件。我想在完成所有编辑后发送它。

他们可能会编辑1条或多条记录而且我不能依赖用户点击

按钮当他们完成所有这些。

session_end的概念将是理想的,除非它(如果)它触发,那么

没有任何东西可以识别会话属于谁。


-


Alphonse Giambrone

电子邮件:a-giam at customdatasolutions dot us

Lucas Tam < RE ******** @ rogers.com>在消息中写道

news:Xn *************************** @ 140.99.99.130 ..。

" Alphonse Giambrone" < NO ********** @ example.invalid>在
新闻中写道:Ob ************** @ TK2MSFTNGP14.phx.gbl:

我可以跟踪记录使用sessionid或用户的
登录,但是如何确定何时发送电子邮件以及用户是谁,因为session_end事件中没有可用的会话信息?



您可以启动新线程来完成数据库工作,然后在线程完成后发送邮件吗?

-
Lucas Tam(RE********@rogers.com)
请删除删除来自回复时的电子邮件地址。
http://成员。 ebay.com/aboutme/coolspot18/



您好Alphonse,


根据您的描述,你正在构建一个asp.net web应用程序,其中用户可以编辑存储在会话中的一些数据,当用户的
会话超时时,我们需要用他的编辑数据发送邮件给他。

然而,你发现它无法在Session_end

事件中检索sessionid,所以你想知道有一些方法可以做到这一点,是吗?


至于问题,我想也许cookie可能是一种方法,因为

cookies存储在客户端mahcine上并且仍然可以访问
Session_End,你可以尝试在用户登录时生成一个相同的密钥,然后用
存储在cookie中以识别他。在Session_End中,使用此cookie值

来获取用户的数据。


此外,Session_End事件似乎仅适用于InProcess模型

session,所以如果你关心这个问题,还有另一种方法

使用Application Cache来存储用户的数据。只需定义一个

某个缓存对象来存储每个用户的数据,我们就可以指定一个

Expire Time并在asp.net中为缓存对象添加EXpire事件处理程序。


我的一些建议。希望有所帮助。

问候,


Steven Cheng

微软在线支持


安全! www.microsoft.com/security

(此帖子按原样提供,不作任何保证,并且不授予

权利。)


I am building a web app for users to add/edit data. They may add/edit
several records during a session.
When they are done (not necessarily immediately, could be 10 or more minutes
later), I need to send an email with some summary info of what was
added/edited.
I can keep track of the records by using the sessionid or user''s login, but
how can I determine when to send the email and who the user was since there
is no session info available in the session_end event?

This will be on a commercial web server so scheduled tasks is not an option.
Is there some method of looping through the active sessions on an
application level so that I could compare the active sessionid''s (or session
variables) with those saved to a db during editing?

TIA

--

Alphonse Giambrone
Email: a-giam at customdatasolutions dot us

解决方案

"Alphonse Giambrone" <NO**********@example.invalid> wrote in
news:Ob**************@TK2MSFTNGP14.phx.gbl:

I can keep track of the records by using the sessionid or user''s
login, but how can I determine when to send the email and who the user
was since there is no session info available in the session_end event?



You could fire off a new thread to do the database work, then send the e-
mail once the thread is done?

--
Lucas Tam (RE********@rogers.com)
Please delete "REMOVE" from the e-mail address when replying.
http://members.ebay.com/aboutme/coolspot18/


Thanks for the reply Lucas.
I don''t quite understand. I don''t want to send an email every time the user
edits a record. I want to send it when they are done with ALL their editing.
They may edit 1 record or many and I can''t depend on a user clicking a
button when they are done with all.
The concept of session_end would be ideal except when (if) it fires, there
is nothing left to identify who the session belonged to.

--

Alphonse Giambrone
Email: a-giam at customdatasolutions dot us
"Lucas Tam" <RE********@rogers.com> wrote in message
news:Xn***************************@140.99.99.130.. .

"Alphonse Giambrone" <NO**********@example.invalid> wrote in
news:Ob**************@TK2MSFTNGP14.phx.gbl:

I can keep track of the records by using the sessionid or user''s
login, but how can I determine when to send the email and who the user
was since there is no session info available in the session_end event?



You could fire off a new thread to do the database work, then send the e-
mail once the thread is done?

--
Lucas Tam (RE********@rogers.com)
Please delete "REMOVE" from the e-mail address when replying.
http://members.ebay.com/aboutme/coolspot18/



Hi Alphonse,

From your description, you''re building an asp.net web application in which
the users can edit some datas which stored in session and when the user''s
session is timeout, we need to send a mail to him with his editing datas.
However, you found its unable to retrieve the sessionid in the Session_end
event , so you''re wondering some means to get that, yes?

As for problem, I think maybe cookie is a possible approach, since the
cookies are stored on the client mahcine and still accessable in
Session_End, you can try generate a identical key when the user login and
store in cookie to idenitfy him. And in Session_End , use this cookie value
to get the data for the user.

In addition, the Session_End event seems only work for InProcess Model
session, so if you''ll care this problem, there is also another approach
that use the Application Cache to store the user''s data. Just define a
certain cache object for storing each user''s data and we can specify a
Expire Time and add EXpire event handler for cache object in asp.net.

Just some of my suggestions. Hope helps.
Regards,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)


这篇关于会话结束后识别用户的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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