Solved

userIsOnlineTimeWindow

Posted on 2006-11-22
16
882 Views
Last Modified: 2008-03-03
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
Comment
Question by:John Account
  • 8
  • 8
16 Comments
 
LVL 9

Expert Comment

by:kraffay
ID: 17999747
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
 

Author Comment

by:John Account
ID: 18000085
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
 
LVL 9

Accepted Solution

by:
kraffay earned 500 total points
ID: 18000209
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
 

Author Comment

by:John Account
ID: 18000564
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
 

Author Comment

by:John Account
ID: 18008552
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
 
LVL 9

Expert Comment

by:kraffay
ID: 18009998
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
 

Author Comment

by:John Account
ID: 18010186
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
 
LVL 9

Expert Comment

by:kraffay
ID: 18020612
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
What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

 

Author Comment

by:John Account
ID: 18030115
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
 
LVL 9

Expert Comment

by:kraffay
ID: 18030196
Well, if you had to keep track of user activity for thousands of users in memory, that may be worse.
0
 

Author Comment

by:John Account
ID: 18031591
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
 
LVL 9

Expert Comment

by:kraffay
ID: 18031726
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
 

Author Comment

by:John Account
ID: 18031837
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
 
LVL 9

Expert Comment

by:kraffay
ID: 18031918
You could write your own membership provider if its an issue.
0
 

Author Comment

by:John Account
ID: 18032074
Okay...this is getting way beyond the scope of the question, so this is where I say thanks. Thanks, Kraffay.
0
 
LVL 9

Expert Comment

by:kraffay
ID: 18032112
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Lots of people ask this question on how to extend the “MembershipProvider” to make use of custom authentication like using existing database or make use of some other way of authentication. Many blogs show you how to extend the membership provider c…
ASP.Net to Oracle Connectivity Recently I had to develop an ASP.NET application connecting to an Oracle database.As I am doing it first time ,I had to solve several problems. This article will help to such developers  to develop an ASP.NET client…
It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

747 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now