Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
Hi,
I am using umbraco 4.7. We are hosting multiple websites in a single installation. So in a cutom section me want to get all the hostnames installed.
Hi mahesh
Try this code once. This code will return all the domain names assign for top node.
public void GetDomains() { try { Node parent = new Node(-1); foreach (Node child in parent.Children) { Domain[] domains = library.GetCurrentDomains(child.Id); if (domains != null && domains.Length >= 0) { foreach (Domain d in domains) { Response.Write(d.Name.ToString() + ";"); } } } } catch (Exception ex) { throw new Exception(ex.Message.ToString()); } }
Hope this will help you.
Pnima
Thanks Pnima. It solved my problem
That'll do it! Great answer
is working on a reply...
This forum is in read-only mode while we transition to the new forum.
You can continue this topic on the new forum by tapping the "Continue discussion" link below.
Continue discussion
Get all host name
Hi,
I am using umbraco 4.7. We are hosting multiple websites in a single installation. So in a cutom section me want to get all the hostnames installed.
Hi mahesh
Try this code once. This code will return all the domain names assign for top node.
Hope this will help you.
Pnima
Thanks Pnima. It solved my problem
That'll do it! Great answer
is working on a reply...
This forum is in read-only mode while we transition to the new forum.
You can continue this topic on the new forum by tapping the "Continue discussion" link below.