/// <summary> /// DoRequestAdministrativeACL method implementation /// </summary> private ACLParametersRecord DoRequestAdministrativeACL(Dictionary <string, bool> servers, string domain, string account, string password, string path) { string fqdn = Dns.GetHostEntry("localhost").HostName; List <string> servernames = (from server in servers where (server.Key.ToLower() != fqdn.ToLower() && (server.Value == true)) select server.Key.ToLower()).ToList <string>(); if (servernames != null) { foreach (string srvfqdn in servernames) { WebAdminClient webthemeclient = new WebAdminClient(); try { webthemeclient.Initialize(srvfqdn); IWebAdminServices client = webthemeclient.Open(); try { ACLParametersRecord rec = client.GetAdministrativeACL(domain, account, password, path); if (rec.Loaded) { Certs.ApplyACLs(rec, path); } return(rec); } catch (Exception e) { webthemeclient.UnInitialize(); _log.WriteEntry(string.Format("Error calling DoRequestAdministrativeACL method : {0} => {1}.", srvfqdn, e.Message), EventLogEntryType.Error, 2011); } finally { webthemeclient.Close(client); } } catch (Exception e) { _log.WriteEntry(string.Format("Error calling DoRequestAdministrativeACL method : {0} => {1}.", srvfqdn, e.Message), EventLogEntryType.Error, 2011); return(new ACLParametersRecord() { Loaded = false }); } } } return(new ACLParametersRecord() { Loaded = false }); }
/// <summary> /// GetAdministrativeACL method implmentation /// </summary> public ACLParametersRecord GetAdministrativeACL(string domain, string account, string password, string path) { ACLParametersRecord rec = new ACLParametersRecord(); try { return(_manager.GetAdministrativeACL(domain, account, password, path)); } catch (Exception e) { _log.WriteEntry(string.Format("Error on WebAdminService Service GetAdministrative ACL method : {0}.", e.Message), EventLogEntryType.Error, 2010); rec.Loaded = false; } return(rec); }
/// <summary> /// DispatchACLs method implmentation /// </summary> public ACLParametersRecord GetAdministrativeACL(string domain, string account, string password, string path) { try { if (_aclrecord.Loaded != true) { if (IsPrimaryComputer(_servers)) { _aclrecord = Certs.FetchACLs(domain, account, password, path); } else { _aclrecord = DoRequestAdministrativeACL(_servers, domain, account, password, path); } } } catch (Exception e) { _log.WriteEntry(string.Format("Error on WebAdminService Service GetAdministrative ACL method : {0}.", e.Message), EventLogEntryType.Error, 2010); _aclrecord.Loaded = false; } return(_aclrecord); }