title: ASP.NET see if member is online
body: <p>I'm developing a ASP.NET site in umbraco, and I need to see if a member with a given ID is online. How can I do that?</p>
  
  <p>So far, I've tried to get the member by so:</p>
  
  <pre><code>Member m = new Member(myID);
  </code></pre>
  
  <p>But how can I check, if the returned member is logged in or not?</p>
  
  <p>EDIT: I followed the link, and extracted the following code from it:</p>
  
  <pre><code>var users = Membership.GetAllUsers();
  
  foreach(MembershipUser user in users){
    Response.Write(user.IsOnline.ToString() +"&lt;br/&gt;");
    Response.Write(user.LastActivityDate.ToString() + "&lt;br/&gt;");
    Response.Write(user.LastLoginDate.ToString() + "&lt;br/&gt;");
  }
  </code></pre>
  
  <p>However, the returned result shows that the property isOnline is true for every member, even though they're not online. I'm aware that it is because of the fact that the LastActivityDate updates automatically whenever I access the user, as stated here: <a href="https://stackoverflow.com/questions/3438200/is-it-possible-to-access-a-profile-without-updating-lastactivitydate">Is it possible to access a profile without updating LastActivityDate?</a>. Unfortunately, I don't get the solution to that question. </p>
  
  <p>I've also tried to access the member by:
      MembershipUser m = Membership.GetUser('myID',false);
  But even though I put false as the second parameter, the LastActivityDate still updates. How can I work around this? I should note that I work with ASP.NET v. 4.0 in umbraco 4.7 at a localhost.</p>
  
  <p>Thanks!</p>
  
  <p>:EDIT END</p>
  
  <p>Best regards,
  Brinck10</p>