如何在asp.net中获取登录用户名

问题描述:



如何获取在任何特定域中运行的登录用户名.
我正在使用asp.net 3.5.
例如:-

我正在使用"parrot.com"之类的域名,并且在该域名中注册了许多用户.
每当任何用户打开我的URL时,我都希望获得该登录用户名.

请帮助我,它非常紧急

Gautam

Hi,

How can i get login user name which are running in any specific domain.
I am using asp.net 3.5.
eg:-

I m using domain like "parrot.com" and in this domain lots of users are registered.
whenever any user open my url then i want to get that login user name.

plz help me its very urgent

Gautam

检查一下:

如何使用ASP.NET获取Window NT记录的用户名 [
check this out:

How to Get Window NT Logged User Name Using ASP.NET[^]

hope this helps :)

for further queries comment here!!


如果您要谈论的是不同域上的任何网站,我唯一想到的方法就是输入一个用户登录或注销时在数据库中访问数据库.我可能还希望每个网页都将一个线程作为会话变量启动,该线程会定期为该用户更新数据库.然后,您可以检查用户记录中最近一次更新的时间,如果它超过某个不可思议的数字(由线程更新延迟指定),则该用户将不再被视为已登录.

继续编码.这很紧急.
If you''re talking about any website on different domains, the only way I can think of is to make an entry in a database whenever a user logs in or logs out. I would also probably have each web page start a thread as a session variable that periodically updates the database for that user. Then you can check the user record for the age of the last update and if it exceeds some magic number (specified by thread update latency), the user is no longer considered to be logged in.

Go forth and code. It''s urgentz.


如果您使用它,可能会找到一些方法.
If you Google it, you might find some ways to do it.