user1350968
user1350968

Reputation: 69

Is User Online?

I am new to ASP.NET membership, and most solutions so far do not work for me.I want to implement a simple query that check if a user is online and returns boolean result.I am using ASP.NET Membership and profile provider.

Maybe a function like this:

    public boolean IsUserOnline(string userName)
{
    boolean result ={some query string here......}

    return result;

}

Any ideas??

Upvotes: 2

Views: 2422

Answers (1)

Kyle Trauberman
Kyle Trauberman

Reputation: 25684

Asp.NET membership does this for you:

Membership.GetUser(username).IsOnline

The length of time since the last request from the user to be considered online is available via the Membership.UserIsOnlineTimeWindow property.

Upvotes: 5

Related Questions