如果您的意思是获取绑定到站点的所有主机标头主机名的列表:
public static List<string> GetHostNamesPerSite(string siteName)
{
using (ServerManager sm = new ServerManager())
{
Site site = sm.Sites.First(s => s.Name == siteName);
return site.Bindings.Select(s => s.Host).ToList();
}
}