コード例 #1
0
        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();
            }
        }
コード例 #2
0
 private void UpdateUsersOnline()
 {
     UserOnlineController objUserOnlineController = new UserOnlineController();
     if ((objUserOnlineController.IsEnabled()))
     {
         this.Status = "Updating Users Online";
         objUserOnlineController.UpdateUsersOnline();
         this.Status = "Update Users Online Successfully";
         this.ScheduleHistoryItem.Succeeded = true;
     }
 }
コード例 #3
0
        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();
            }
        }
コード例 #4
0
        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();
            }
        }