Ejemplo 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;
     }
 }
Ejemplo 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);
            }
        }
Ejemplo n.º 3
0
 public string InstallTable()
 {
     try
     {
         Wait();
         UrlTrackerRepository.CreateUrlTrackerTable();
     }
     catch (Exception ex)
     {
         return(HandleException(ex));
     }
     return(string.Empty);
 }