private void RemoveConfigurationSecureTokenServices() { try { XmlDocument stsConfig = new XmlDocument(); ZimbraConfiguration.GetWebConfig(ZimbraConfiguration.stsServicesConfigPath, ref stsConfig); ZimbraConfiguration.RemoveSectionGroupZimbra(ref stsConfig); ZimbraConfiguration.RemoveProviderZimbra(ref stsConfig); //ZimbraConfiguration.AppendModuleZimbra(ref stsConfig); ZimbraConfiguration.SetWebConfig(ZimbraConfiguration.stsServicesConfigPath, ref stsConfig); stsConfig = null; ZimbraConfiguration.STSAppPool.Recycle(); } catch { } }
private void RemoveConfigurationCentralAdministration() { try { XmlDocument caConfig = new XmlDocument(); ZimbraConfiguration.GetWebConfig(ZimbraConfiguration.caServicesConfigPath, ref caConfig); ZimbraConfiguration.RemoveSectionGroupZimbra(ref caConfig); ZimbraConfiguration.RemoveProviderZimbra(ref caConfig); ZimbraConfiguration.RemoveModuleZimbra(ref caConfig); ZimbraConfiguration.SetWebConfig(ZimbraConfiguration.caServicesConfigPath, ref caConfig); caConfig = null; ZimbraConfiguration.CAAppPool.Recycle(); //while (ZimbraConfiguration.SPAdminv4.State == ObjectState.Starting || ZimbraConfiguration.SPAdminv4.State == ObjectState.Stopping) //{ // System.Threading.Thread.Yield(); //} //if (ZimbraConfiguration.SPAdminv4.State == ObjectState.Started) //{ // ZimbraConfiguration.SPAdminv4.Stop(); //} //while (ZimbraConfiguration.SPAdminv4.State != ObjectState.Stopped || ZimbraConfiguration.SPAdminv4.State == ObjectState.Stopping) //{ // System.Threading.Thread.Yield(); //} //if (ZimbraConfiguration.SPAdminv4.State == ObjectState.Stopped) //{ // ZimbraConfiguration.SPAdminv4.Start(); //} } catch { } }
private void RemoveConfigurationRootWebServices() { try { XmlDocument wsConfig = new XmlDocument(); ZimbraConfiguration.GetWebConfig(ZimbraConfiguration.rootServicesConfigPath, ref wsConfig); ZimbraConfiguration.RemoveSectionGroupZimbra(ref wsConfig); ZimbraConfiguration.RemoveProviderZimbra(ref wsConfig); //ZimbraConfiguration.AppendModuleZimbra(ref wsConfig); ZimbraConfiguration.SetWebConfig(ZimbraConfiguration.rootServicesConfigPath, ref wsConfig); wsConfig = null; ZimbraConfiguration.WSAppPool.Recycle(); //while (ZimbraConfiguration.SPServices.State == ObjectState.Starting || ZimbraConfiguration.SPServices.State == ObjectState.Stopping) //{ // System.Threading.Thread.Yield(); //} //if (ZimbraConfiguration.SPServices.State == ObjectState.Started) //{ // ZimbraConfiguration.SPServices.Stop(); //} //while (ZimbraConfiguration.SPServices.State != ObjectState.Stopped || ZimbraConfiguration.SPServices.State == ObjectState.Stopping) //{ // System.Threading.Thread.Yield(); //} //if (ZimbraConfiguration.SPServices.State == ObjectState.Stopped) //{ // ZimbraConfiguration.SPServices.Start(); //} } catch { } }