/// <summary> /// Finds the proecess identity type of an AppPool. /// </summary> /// <param name="appPoolName">AppPool to find</param> /// <returns> The proecess identity type of the AppPool; or null if the apppool does not exist</returns> public static string AppPoolProcessIdentity(string appPoolName) { ApplicationPool appPool = IISVerifier.GetAppPool(appPoolName); if (null != appPool) { return(appPool.ProcessModel.IdentityType.ToString()); } else { return(null); } }
/// <summary> /// Finds the queue length of an AppPool. /// </summary> /// <param name="appPoolName">AppPool to find</param> /// <returns> The size of the AppPool queue length; or -1 if the apppool does not exist</returns> public static long AppPoolQueueLength(string appPoolName) { ApplicationPool appPool = IISVerifier.GetAppPool(appPoolName); if (null != appPool) { return(appPool.QueueLength); } else { return(-1); } }
/// <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); } }
/// <summary> /// Checks if a Certificate exists /// </summary> /// <param name="certificateName">The certificate to look for</param> /// <param name="storeLocation">The strore location to look under</param> /// <returns> Return true/false </returns> public static bool CertificateExists(string certificateName, StoreLocation storeLocation) { X509Certificate certificate = IISVerifier.GetCertificate(certificateName, storeLocation); return(certificate != null); }
/// <summary> /// Checks if a AppPool exsts. /// </summary> /// <param name="appPoolName">AppPool to find</param> /// <returns> Return true/false </returns> public static bool AppPoolExists(string appPoolName) { return(null != IISVerifier.GetAppPool(appPoolName)); }
/// <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)); }