public string[] GetDomains() { try { svcDomainAdmin domains = new svcDomainAdmin(); PrepareProxy(domains); DomainListResult result = domains.GetAllDomains(AdminUsername, AdminPassword); if (!result.Result) throw new Exception(result.Message); return result.DomainNames; } catch (Exception ex) { throw new Exception("Could not get the list of mail domains", ex); } }