public void OnAuthorizeRequest(object s, EventArgs e)
        {
            //First check if we are upgrading/installing
            var app = (HttpApplication) s;
            HttpRequest request = app.Request;

            //check if we are upgrading/installing or if this is a captcha request
            if (request.Url.LocalPath.ToLower().EndsWith("/install/install.aspx")
                || request.Url.LocalPath.ToLower().Contains("/install/installwizard.aspx")
                || request.Url.LocalPath.ToLower().Contains("/install/upgradewizard.aspx")
                || request.Url.LocalPath.ToLower().EndsWith("captcha.aspx") 
                || request.Url.LocalPath.ToLower().EndsWith("scriptresource.axd") 
                || request.Url.LocalPath.ToLower().EndsWith("webresource.axd"))
            {
                return;
            }
            //Create a Users Online Controller
            var objUserOnlineController = new UserOnlineController();

            //Is Users Online Enabled?
            if ((objUserOnlineController.IsEnabled()))
            {
                objUserOnlineController.TrackUsers();
            }
        }
        /// -----------------------------------------------------------------------------
        /// <summary>
        /// UpdateUsersOnline updates the Users Online information
        /// </summary>
        /// <history>
        ///     [cnurse]	03/14/2006	documented
        /// </history>
        /// -----------------------------------------------------------------------------
        private void UpdateUsersOnline()
        {
            var objUserOnlineController = new UserOnlineController();

            //Is Users Online Enabled?
            if ((objUserOnlineController.IsEnabled()))
            {
                //Update the Users Online records from Cache
                Status = "Updating Users Online";
                objUserOnlineController.UpdateUsersOnline();
                Status = "Update Users Online Successfully";
                ScheduleHistoryItem.Succeeded = true;
            }
        }
        public void OnAuthorizeRequest( object s, EventArgs e )
        {
            //First check if we are upgrading/installing
            HttpApplication app = (HttpApplication)s;
            HttpRequest Request = app.Request;
            if( Request.Url.LocalPath.EndsWith( "Install.aspx" ) )
            {
                return;
            }

            // Create a Users Online Controller
            UserOnlineController objUserOnlineController = new UserOnlineController();

            // Is Users Online Enabled?
            if( objUserOnlineController.IsEnabled() )
            {
                // Track the current user
                objUserOnlineController.TrackUsers();
            }
        }
        public void OnAuthorizeRequest(object s, EventArgs e)
        {
            //First check if we are upgrading/installing
            var app = (HttpApplication) s;
            HttpRequest request = app.Request;

            //check if we are upgrading/installing or if this is a captcha request
            if (!Initialize.ProcessHttpModule(request, false, false))
            {
                return;
            }

            //Create a Users Online Controller
            var objUserOnlineController = new UserOnlineController();

            //Is Users Online Enabled?
            if ((objUserOnlineController.IsEnabled()))
            {
                objUserOnlineController.TrackUsers();
            }
        }
 /// -----------------------------------------------------------------------------
 /// <summary>
 /// Gets whether the user in question is online
 /// </summary>
 /// <remarks>
 /// </remarks>
 /// <param name="user">The user.</param>
 /// <returns>A Boolean indicating whether the user is online.</returns>
 /// -----------------------------------------------------------------------------
 public override bool IsUserOnline(UserInfo user)
 {
     bool isOnline = false;
     var objUsersOnline = new UserOnlineController();
     if (objUsersOnline.IsEnabled())
     {
         Hashtable userList = objUsersOnline.GetUserList();
         var onlineUser = (OnlineUserInfo) userList[user.UserID.ToString()];
         if (onlineUser != null)
         {
             isOnline = true;
         }
         else
         {
             //Next try the Database
             onlineUser = CBO.FillObject<OnlineUserInfo>(_dataProvider.GetOnlineUser(user.UserID));
             if (onlineUser != null)
             {
                 isOnline = true;
             }
         }
     }
     return isOnline;
 }
        /// <summary>
        /// Gets whether the user in question is online
        /// </summary>
        /// <remarks>
        /// </remarks>
        /// <param name="user">The user.</param>
        /// <returns>A Boolean indicating whether the user is online.</returns>
        /// <history>
        ///     [cnurse]	03/14/2006	created
        /// </history>
        public override bool IsUserOnline( UserInfo user )
        {
            bool isOnline = false;
            UserOnlineController objUsersOnline = new UserOnlineController();

            if( objUsersOnline.IsEnabled() )
            {
                //First try the Cache
                Hashtable userList = objUsersOnline.GetUserList();
                OnlineUserInfo onlineUser = userList[user.UserID.ToString()] as OnlineUserInfo;

                if( onlineUser != null )
                {
                    isOnline = true;
                }
                else
                {
                    //Next try the Database
                    onlineUser = (OnlineUserInfo)CBO.FillObject( dataProvider.GetOnlineUser( user.UserID ), typeof( OnlineUserInfo ) );
                    if( onlineUser != null )
                    {
                        isOnline = true;
                    }
                }
            }

            return isOnline;
        }