[Webinar] Streamline your web hosting managementRegister Today

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1007
  • Last Modified:

userIsOnlineTimeWindow

The help of an Expert is needed. As you can see on this page, a kind Expert has helped me to display a list of users presently online: http://www.experts-exchange.com/Programming/Programming_Languages/Dot_Net/ASP_DOT_NET/Q_22068663.html
However, it doesn't even matter if there's any activity from the user or not. After the 15 minutes has passed, as stipulated in userIsOnlineTimeWindow="15", the user is removed, regardless of whether or not he/she had any activity. And that really sucks, and this whole daggone Membership and User thing doesn't make any sense at all. So surely Microsoft wouldn't create a stupid thing like that; so I must be the one who's stupid here, and needs to be informed. Hence, I need an Expert to enlighten me. Please do.
0
John Account
Asked:
John Account
  • 8
  • 8
1 Solution
 
kraffayCommented:
Online means the session for that user is active.  The user can log in and stare at the home page for 16 minutes, and he would be flagged as IsOnline = false.  His next hit at the site would reset the flag to true.
0
 
John AccountAuthor Commented:
Well, that's the point. He's not staring at the screen for 16 minutes, or even for 3--during my tests--he's continually doing stuff, going to other pages in the site, clicking around. Doing things. And, still, after the 15 minutes has expired, so has his session--hence, it shows that he is not online.
0
 
kraffayCommented:
Hmmm...There's not much on this property, but one of my books does say that the computation of the time is made  by comparing the LastActivityDate property for the user to the current UTC time on the web server.  Is your web server time syncronized with a common time source?
0
Never miss a deadline with monday.com

The revolutionary project management tool is here!   Plan visually with a single glance and make sure your projects get done.

 
John AccountAuthor Commented:
Hmmmmmmmmmmnnnnnnn...you know what, I was doing it from Visual Studio. Maybe I should actually deploy the site to the server and try it that way and see if it's still not working.
0
 
John AccountAuthor Commented:
I've deployed it to the web and it still doesn't work. After the allocated time--15 minutes--the user gets dropped from the online list, whether or not there's been any activity from him. So that property seems rather useless; but, surely, there must be something I'm missing here.
0
 
kraffayCommented:
Can you update the LastActivityDate during their session?  Can you take a look at that table and see if that field is getting changed?  If not, you may need to manually update it.
0
 
John AccountAuthor Commented:
I ran a search for LastActivityDate. I don't have that property anywhere in my document. I'm telling you, kraffay--I don't know nothin' about this stuff! I have done very little in Asp.Net, and this is my first time using Memberships--but it's really cool--I love it, every time I learn something new with it, it's great. But there sure is a lot to learn. Whew.
0
 
kraffayCommented:
The LastActivityDate is in the aspnet_users table.  I think that if you update that field manually, perhaps at each postback, the IsOnline Funtionality may work.
0
 
John AccountAuthor Commented:
Goodness gracious, so this whole feature is simply a database keeping record. Bummers. I thought it wouldn've been a server function keeping track of who's online, like in an array, for instance.

So this just adds more overhead to the database.
0
 
kraffayCommented:
Well, if you had to keep track of user activity for thousands of users in memory, that may be worse.
0
 
John AccountAuthor Commented:
I guess there's no easy way then--easy as in easy with overhead, that is.

What if I have only a hundred users in the system, continually engaging in activity--that is, to say, that each user is continually hitting the database to insert records letting it know that he's still active. Whew...wouldn't that be a lot of overhead? Now, let's say the site escalated to a thousand simultaneous users. That would be quite a bit of activity on the database, wouldn't it? I mean, what would be an adaquate process and RAM to handle all that activity?
0
 
kraffayCommented:
Its a memory vs database overhead issue.  No, I don't think updating a database on a user event, perhaps on page_load is a big hit.  Managing state in a database is an accepted approach.  
0
 
John AccountAuthor Commented:
So you don't think a thousand active users on a website would have a lot of overhead on the database utilizing Memberships like this? I have my mssql server 2005 on a 1.2 Ghz with 608 MB of RAM free on the system--and that's all that server is used for, the mssql server 2005. The website is on another server.
0
 
kraffayCommented:
You could write your own membership provider if its an issue.
0
 
John AccountAuthor Commented:
Okay...this is getting way beyond the scope of the question, so this is where I say thanks. Thanks, Kraffay.
0
 
kraffayCommented:
0

Featured Post

Never miss a deadline with monday.com

The revolutionary project management tool is here!   Plan visually with a single glance and make sure your projects get done.

  • 8
  • 8
Tackle projects and never again get stuck behind a technical roadblock.
Join Now