Results 1 to 6 of 6

Thread: How to know which users are online?

  1. #1

    Thread Starter
    Frenzied Member
    Join Date
    Oct 2000
    Posts
    1,463

    Question How to know which users are online?

    Hi,

    I've got a website project and I use my own login security and save the user and other info in session variables. Is there any way to know when they are online and offline by their user name I have in a session variable? Or do I need to use another method such as the asp.net user security?

    I do know with the asp.net security I can check if a user is authenticated.

    Thanks,

    Warren

  2. #2
    Frenzied Member
    Join Date
    Jul 2005
    Posts
    1,168

    Re: How to know which users are online?

    Quote Originally Posted by WarrenW View Post
    Hi,

    I've got a website project and I use my own login security and save the user and other info in session variables. Is there any way to know when they are online and offline by their user name I have in a session variable? Or do I need to use another method such as the asp.net user security?

    I do know with the asp.net security I can check if a user is authenticated.

    Thanks,

    Warren
    I think you may be able to do so by changing your SessionState to SQL Server Mode.

    More info here: http://msdn.microsoft.com/en-us/library/ms972429.aspx

  3. #3
    Sleep mode
    Join Date
    Aug 2002
    Location
    RUH
    Posts
    8,083

    Re: How to know which users are online?

    If you're using asp.net built-in membership , you can use this function :

    Code:
    System.Web.Security.Membership.GetUser().IsOnline
    (and you can use overloaded function that takes specific username) .

    Have a look at this property which let you specify number of minutes considered user is online:

    Code:
     System.Web.Security.Membership.UserIsOnlineTimeWindow

  4. #4
    PowerPoster gep13's Avatar
    Join Date
    Nov 2004
    Location
    The Granite City
    Posts
    21,963

    Re: How to know which users are online?

    Quote Originally Posted by WarrenW View Post
    Or do I need to use another method such as the asp.net user security?
    Personally, this would always be my recommendation. Why re-invent the wheel when you can just as easily use something that a lot of clever people have spent a lot of time getting right?

    Gary

  5. #5

    Thread Starter
    Frenzied Member
    Join Date
    Oct 2000
    Posts
    1,463

    Re: How to know which users are online?

    I didn't think about it until after I made the post. I haven't fully written the current login security so switching over to the asp.net security will not be hard at all.

    Btw, do you know if I can create my own login page in my own style? So far for other sites i have dropped in the login control which is kind of ugly!

    Thanks,

    Warren

  6. #6
    PowerPoster gep13's Avatar
    Join Date
    Nov 2004
    Location
    The Granite City
    Posts
    21,963

    Re: How to know which users are online?

    Hello,

    The Template of the Login Control is fully configurable, so you can make it look and feel however you want it to.

    http://msdn.microsoft.com/en-us/library/ms178339.aspx

    Gary

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width