You do not need WebClient to download rss.
XDocument wp = XDocument.Load("http://wordpress.org/news/feed/"); XNamespace ns = XNamespace.Get("http://purl.org/rss/1.0/modules/content/"); foreach (var content in wp.Descendants(ns + "encoded")) { Console.WriteLine(System.Net.WebUtility.HtmlDecode(content.Value)+"\n\n"); }
EDIT
The problem is with compression. If the client does not support compression, the server does not send content.
WebClient web = new WebClient(); web.Headers["Accept-Encoding"] = "gzip,deflate,sdch"; var zip = new System.IO.Compression.GZipStream( web.OpenRead("http://www.whiskymag.fr/feed/?post_type=sortir"), System.IO.Compression.CompressionMode.Decompress); string rss = new StreamReader(zip, Encoding.UTF8).ReadToEnd();
source share