public ActionResult GetNumberOfUserOnline() { try { ActionResult authentication = ServiceHelper.CheckAuthentication(); if (!authentication.Success) { return(authentication); } int numberOfUsersOnline = Membership.GetNumberOfUsersOnline(); return(new ActionResult { Message = string.Empty, Success = true, // DataObjects = numberOfUsersOnline.ToString() }); } catch (Exception exception) { ServiceHelper.LogException(exception, new Dictionary <string, string>(), ErrorSource.Authentication); return(new ActionResult { Success = false, Message = "Error, failed to get number of users online." }); } }
public ActionResult GetAllUsers() { try { ActionResult authentication = ServiceHelper.CheckAuthentication(); if (!authentication.Success) { return(authentication); } // var membershipUserCollection = Membership.GetAllUsers(); // string json = new JavaScriptSerializer().Serialize(membershipUserCollection); return(new ActionResult { Message = string.Empty, Success = true, // DataObjects = json }); } catch (Exception exception) { ServiceHelper.LogException(exception, new Dictionary <string, string>(), ErrorSource.Authentication); return(new ActionResult { Success = false, Message = "Error, failed to get all users." }); } }