Again, while that's good info, that will give me a list of the users within Active Directory. I want to know a list of the users logged into the site currently, which uses active directory authentication.
For Instance, if my Active Directory Contains This List:
John
Paul
James
But currently these are the people logged into the application:
Paul
James
I would like to see that list of logged in people somehow. So what will return:
You need to keep track of the user who logged in to you application and also each page he/she navigates. That way you can see the list of users accessing your page
---------------------------------------------------------------------------
Hope this helps, if it does then mark it as answer
Rohit
So manually do it? There is no built in way even when you use the asp.net login control?
Hi JStellato,
If you have a database table with predefined usernames and passwords, then all you have to do is add a numeric field called "isonline" or something.
When the user logs on then set that field to 1 or it will be 0(Yes, it's possible),if the user log out ,then set isonline to 2.
If the field is set to 2 then all you have to do is iterate through the table to find the usernames of all that has the field "isonline" = 2.
For the field to 1 are the current user.
Thanks,
Amy Peng
Please mark the replies as answers if they help or unmark if not.
Feedback to us
JStellato
Member
147 Points
224 Posts
Can I See A List of Users Logged Into My ASP.net Page
Nov 10, 2012 05:00 PM|LINK
Is it possible to see if someone is logged into your page, I am using the built in asp.net login features, with Active Directory.
Thanks!
chaaraan
Contributor
2170 Points
484 Posts
Re: Can I See A List of Users Logged Into My ASP.net Page
Nov 10, 2012 05:18 PM|LINK
HI,
To get the current user logged into the page check this property
string strUserName = Page.User.Identity.Name;
Regards,
Charan
JStellato
Member
147 Points
224 Posts
Re: Can I See A List of Users Logged Into My ASP.net Page
Nov 10, 2012 05:39 PM|LINK
Yeah I understand that, but that only shows me the current user, I want to see ALL the users logged in currently.
chaaraan
Contributor
2170 Points
484 Posts
Re: Can I See A List of Users Logged Into My ASP.net Page
Nov 10, 2012 05:59 PM|LINK
Hi
Check this link : http://stackoverflow.com/questions/5162897/how-can-i-get-a-list-of-users-from-active-directory
Regards,
Charan
JStellato
Member
147 Points
224 Posts
Re: Can I See A List of Users Logged Into My ASP.net Page
Nov 10, 2012 06:07 PM|LINK
Again, while that's good info, that will give me a list of the users within Active Directory. I want to know a list of the users logged into the site currently, which uses active directory authentication.
For Instance, if my Active Directory Contains This List:
John
Paul
James
But currently these are the people logged into the application:
Paul
James
I would like to see that list of logged in people somehow. So what will return:
Paul
James
Rohit Kukret...
Participant
1659 Points
318 Posts
Re: Can I See A List of Users Logged Into My ASP.net Page
Nov 10, 2012 09:04 PM|LINK
You need to keep track of the user who logged in to you application and also each page he/she navigates. That way you can see the list of users accessing your page
Hope this helps, if it does then mark it as answer
Rohit
JStellato
Member
147 Points
224 Posts
Re: Can I See A List of Users Logged Into My ASP.net Page
Nov 10, 2012 10:54 PM|LINK
So manually do it? There is no built in way even when you use the asp.net login control?
ramiramilu
All-Star
95473 Points
14106 Posts
Re: Can I See A List of Users Logged Into My ASP.net Page
Nov 11, 2012 01:54 PM|LINK
you need to try something like thos - http://blog.dreamlabsolutions.com/post/2009/07/13/ASPNET-Membership-Show-list-of-users-online.aspx
thanks,
JumpStart
Anil Srivast...
Member
442 Points
292 Posts
Re: Can I See A List of Users Logged Into My ASP.net Page
Nov 11, 2012 03:26 PM|LINK
Amy Peng - M...
Star
10151 Points
963 Posts
Microsoft
Re: Can I See A List of Users Logged Into My ASP.net Page
Nov 14, 2012 04:21 AM|LINK
Hi JStellato,
If you have a database table with predefined usernames and passwords, then all you have to do is add a numeric field called "isonline" or something.
When the user logs on then set that field to 1 or it will be 0(Yes, it's possible),if the user log out ,then set isonline to 2.
If the field is set to 2 then all you have to do is iterate through the table to find the usernames of all that has the field "isonline" = 2.
For the field to 1 are the current user.
Thanks,
Amy Peng
Feedback to us
Develop and promote your apps in Windows Store