protected Uri DiscoverPingbackLink(string page) { try { using (SgmlReader reader = new SgmlReader()) { while (reader.ReadToFollowing("link")) { XElement link = XElement.Load(reader); if (link.Attribute("rel") != null && link.Attribute("rel").Value == "pingback") return new Uri(link.Attribute("href").Value); //TODO: deal with base Uri? } } } catch (Exception ex) { LogService.Error(ex); } return null; }