如何跟踪用户登录 [英] How to Track User Login

查看:87
本文介绍了如何跟踪用户登录的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用windows验证模式。当用户登录网站时,我想存储

用户名和各种信息。

有什么想法吗?


存储注销时间也是一个额外的好处,但我听说这很难和不可靠但是如果有人知道这样做的方式我也是

全部耳朵。

(Visual Studio 2005,Asp.net 2.0,Visual Basic)

I am using "windows" authentication mode. I would like to store the
username and various information when the user logs on to the website.
Any ideas?

It would be a bonus to store the logout time too but I hear that is
difficult and unreliable but if anyone knows a way to do that too I am
all ears.
(Visual Studio 2005, Asp.net 2.0, Visual Basic)

推荐答案

Hi Mel,<如果您使用Windows身份验证,则
IIS可以对您的用户进行身份验证

。您是否允许匿名用户访问您的应用程序?如果没有你

可以在Session_Start中处理你的登录。处理注销很困难因为

如果用户关闭浏览器你没有收到任何关于它的信息(除非

你构建了一些机制来简单地从浏览器ping应用程序

的间隔)。你也可以完全相信Session_End,因为只有当会话在asp.net工作进程中运行InProc = local时才会提出




问候,

Ladislav


" Mel"写道:
Hi Mel,
if you are using windows authentication IIS is responible for authenticating
your user. Do you allow anonymous users to access your application? If no you
can handle your login in Session_Start. Handling logout is difficult because
if user closes browser you do not receive any information about it (unless
you build some mechanism to ping application from browser in short
intervals). You also can fully believe to Session_End because it is raised
only if session is running InProc = locally in asp.net worker process.

Regards,
Ladislav

"Mel" wrote:

我正在使用windows验证模式。当用户登录网站时,我想存储

用户名和各种信息。

有什么想法吗?


存储注销时间也是一个额外的好处,但我听说这很难和不可靠但是如果有人知道这样做的方式我也是

全部耳朵。


(Visual Studio 2005,Asp.net 2.0,Visual Basic)

I am using "windows" authentication mode. I would like to store the
username and various information when the user logs on to the website.
Any ideas?

It would be a bonus to store the logout time too but I hear that is
difficult and unreliable but if anyone knows a way to do that too I am
all ears.
(Visual Studio 2005, Asp.net 2.0, Visual Basic)


*你也无法相信Session_End ...


" Ladislav Mrnka"写道:
*You also cannot believe to Session_End ...

"Ladislav Mrnka" wrote:

嗨Mel,

如果您使用的是Windows身份验证IIS可以对您的用户进行身份验证

。您是否允许匿名用户访问您的应用程序?如果没有你

可以在Session_Start中处理你的登录。处理注销很困难因为

如果用户关闭浏览器你没有收到任何关于它的信息(除非

你构建了一些机制来简单地从浏览器ping应用程序

的间隔)。你也可以完全相信Session_End,因为只有当会话在asp.net工作进程中运行InProc = local时才会提出




问候,

Ladislav


" Mel"写道:
Hi Mel,
if you are using windows authentication IIS is responible for authenticating
your user. Do you allow anonymous users to access your application? If no you
can handle your login in Session_Start. Handling logout is difficult because
if user closes browser you do not receive any information about it (unless
you build some mechanism to ping application from browser in short
intervals). You also can fully believe to Session_End because it is raised
only if session is running InProc = locally in asp.net worker process.

Regards,
Ladislav

"Mel" wrote:

我正在使用windows验证模式。当用户登录网站时,我想存储

用户名和各种信息。

有什么想法吗?


存储注销时间也是一个额外的好处,但我听说这很难和不可靠但是如果有人知道这样做的方式我也是

全部耳朵。

(Visual Studio 2005,Asp.net 2.0,Visual Basic)
I am using "windows" authentication mode. I would like to store the
username and various information when the user logs on to the website.
Any ideas?

It would be a bonus to store the logout time too but I hear that is
difficult and unreliable but if anyone knows a way to do that too I am
all ears.
(Visual Studio 2005, Asp.net 2.0, Visual Basic)


8月15日,10: 14日上午,Ladislav Mrnka

< LadislavMr ... @ discussion.microsoft.comwrote:
On Aug 15, 10:14 am, Ladislav Mrnka
<LadislavMr...@discussions.microsoft.comwrote:

Hi Mel,

如果您使用的是Windows身份验证IIS可以对您的用户进行身份验证

。您是否允许匿名用户访问您的应用程序?如果没有你

可以在Session_Start中处理你的登录。处理注销很困难因为

如果用户关闭浏览器你没有收到任何关于它的信息(除非

你构建了一些机制来简单地从浏览器ping应用程序

的间隔)。你也可以完全相信Session_End,因为只有当会话在asp.net工作进程中运行InProc = local时才会提出




问候,

Ladislav


" Mel"写道:
Hi Mel,
if you are using windows authentication IIS is responible for authenticating
your user. Do you allow anonymous users to access your application? If no you
can handle your login in Session_Start. Handling logout is difficult because
if user closes browser you do not receive any information about it (unless
you build some mechanism to ping application from browser in short
intervals). You also can fully believe to Session_End because it is raised
only if session is running InProc = locally in asp.net worker process.

Regards,
Ladislav

"Mel" wrote:

我正在使用windows验证模式。我想在用户登录网站时存储

用户名和各种信息。

有什么想法吗?
I am using "windows" authentication mode. I would like to store the
username and various information when the user logs on to the website.
Any ideas?


存储注销时间也是一个奖励,但我听说这是一个很难且不可靠的
但是如果有的话我也知道这样做的方法。所有的耳朵都是b $ b。
It would be a bonus to store the logout time too but I hear that is
difficult and unreliable but if anyone knows a way to do that too I am
all ears.


(Visual Studio 2005,Asp.net 2.0,Visual Basic)
(Visual Studio 2005, Asp.net 2.0, Visual Basic)



很酷。我将在我的项目中添加一个Global.asax,并尝试将我的

代码添加到Session_Start过程中。我会在这里发布代码,当时我已经完成了它。

Cool. I will just add a Global.asax to my project and try adding my
code to the Session_Start procedure. I''ll post the code here when I
get it finished.


这篇关于如何跟踪用户登录的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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