RemoveApplication() public static method

Remove all the IIS applications matching given path.
public static RemoveApplication ( string siteName, string path ) : bool
siteName string
path string
return bool
示例#1
0
        public override void Uninstall(IDictionary savedState)
        {
            foreach (var sample in Samples)
            {
                try
                {
                    IIS.RemoveApplication(DefaultWebSite, ApplicationDir(sample));
                }
                catch (Exception ex)
                {
                    ShowError("Error while removing '{0}' IIS applications from '{1}'\n\n{2}", sample, DefaultWebSite, ex.Message);
                }
            }

            try
            {
                IIS.RemoveApplicationPool(PhalangerAppPool);
            }
            catch (Exception ex)
            {
                ShowError("Error while removing '{0}' IIS application pool\n\n{1}", PhalangerAppPool, ex.Message);
            }
        }