Exemplo n.º 1
0
 static void CheckUrlTrackerInstalled()
 {
     try
     {
         if (!_urlTrackerInstalled && Application.SqlHelper != null)
         {
             lock (_lock)
             {
                 _urlTrackerInstalled = UrlTrackerRepository.GetUrlTrackerTableExists();
                 if (!_urlTrackerInstalled)
                 {
                     UrlTrackerRepository.CreateUrlTrackerTable();
                     UrlTrackerInstallerService installer = new UrlTrackerInstallerService()
                     {
                         DontWait = true
                     };
                     try
                     {
                         installer.InstallDashboard();
                     }
                     catch (DashboardAlreadyInstalledException) { }
                 }
                 UrlTrackerRepository.UpdateUrlTrackerTable();
             }
         }
     }
     catch (ArgumentNullException)             // Thrown if the umbraco connectionstring is empty
     {
         _execute = false;
     }
 }
Exemplo n.º 2
0
        void context_AcquireRequestState(object sender, EventArgs e)
        {
            try
            {
                if (!_urlTrackerInstalled && Application.SqlHelper != null)
                {
                    lock (_lock)
                    {
                        _urlTrackerInstalled = UrlTrackerRepository.GetUrlTrackerTableExists();
                        if (_urlTrackerInstalled)
                        {
                            UrlTrackerRepository.UpdateUrlTrackerTable();
                        }
                        if (!_urlTrackerInstalled)
                        {
                            UrlTrackerRepository.CreateUrlTrackerTable();
                        }
                        UrlTrackerRepository.UpdateUrlTrackerTable();
                    }
                }
            }
            catch (ArgumentNullException) // Thrown if the umbraco connectionstring is empty
            {
                _execute = false;
            }

            if (_execute)
            {
                UrlTrackerDo("AcquireRequestState", ignoreHttpStatusCode: true);
            }
        }
Exemplo n.º 3
0
        void context_AcquireRequestState(object sender, EventArgs e)
        {
            if (!_urlTrackerInstalled && Application.SqlHelper != null)
            {
                lock (_lock)
                {
                    _urlTrackerInstalled = UrlTrackerRepository.GetUrlTrackerTableExists();
                    if (_urlTrackerInstalled)
                    {
                        UrlTrackerRepository.UpdateUrlTrackerTable();
                    }
                }
            }

            UrlTrackerDo(ignoreHttpStatusCode: true);
        }