public string GetSafeSmartSearchPath()
 {
     if (SmartSearchUrl.LastIndexOf("/", StringComparison.CurrentCulture).Equals(SmartSearchUrl.Length))
     {
         SmartSearchUrl.Remove(SmartSearchUrl.Length - 1);
     }
     if (!SmartSearchUrl.ToLower().Contains("http://"))
     {
         if (SmartSearchUrl.ToLower().Contains("https://"))
         {
             //do nothing,, its https
         }
         else
         {
             SmartSearchUrl = string.Format("http://{0}", SmartSearchUrl);
         }
     }
     return(SmartSearchUrl);
 }
        public string GetSmartSearchIndexingPath()
        {
            string indexingQueryString      = "generateindex";
            string indexingQueryStringValue = "true";

            if (SmartSearchUrl.LastIndexOf("/", StringComparison.CurrentCulture).Equals(SmartSearchUrl.Length))
            {
                SmartSearchUrl.Remove(SmartSearchUrl.Length - 1);
            }
            if (!SmartSearchUrl.ToLower().Contains("http://"))
            {
                if (SmartSearchUrl.ToLower().Contains("https://"))
                {
                    //do nothing,, its https
                }
                else
                {
                    SmartSearchUrl = string.Format("http://{0}", SmartSearchUrl);
                }
            }
            return(string.Format("{0}?{1}={2}", SmartSearchUrl, indexingQueryString, indexingQueryStringValue));
        }