Ejemplo n.º 1
0
        /// <summary>
        /// Checks if a Web Site is started.
        /// </summary>
        /// <param name="siteName">Web Site to find</param>
        /// <returns> Return true if the website is started, false if not, or the website does not exist </returns>
        public static bool WebSiteStarted(string siteName)
        {
            Site site = IISVerifier.GetWebSite(siteName);

            if (null != site)
            {
                return(site.State == Microsoft.Web.Administration.ObjectState.Started);
            }
            else
            {
                return(false);
            }
        }
Ejemplo n.º 2
0
 /// <summary>
 /// Checks if a Web Site exsts.
 /// </summary>
 /// <param name="siteName">Web Site to find</param>
 /// <returns> Return true/false </returns>
 public static bool WebSiteExists(string siteName)
 {
     return(null != IISVerifier.GetWebSite(siteName));
 }