2

I use a simple call to get a RssFeed. But everytime I call the request, it throws a WebException which says "Remoteserver didn't answer". But if I try it with IE/Chrome/Firefox, I got an answer.

So I tried to start a minimal consoleproject only with this function :

class Test
{
    static void Main(string[] args)
    {
        WebRequest request = WebRequest.Create(@"http://stackoverflow.com/feeds/question/13952467");
        request.Timeout = System.Threading.Timeout.Infinite;

        using(WebResponse response = request.GetResponse())
        using(XmlReader reader = XmlReader.Create(response.GetResponseStream()))
        {
            XmlDocument xmlDoc = new XmlDocument();
            xmlDoc.Load(reader);
            foreach(XmlNode _node in xmlDoc.SelectNodes("rss/channel/item"))
            {
                Console.WriteLine(_node.InnerText);
            }
        }

        Console.Read();
    }
}

These minimalproject works, so the problem is into my project settings, but what's going with my mainproject?

Omar
  • 16,329
  • 10
  • 48
  • 66
Kooki
  • 1,157
  • 9
  • 30
  • 1
    Try to activate logs for the namespace System.Net. http://blogs.msdn.com/b/dgorti/archive/2005/09/18/471003.aspx – schglurps Dec 19 '12 at 12:41
  • I activated it, but it's in german language so I thinks, it's not helpfull for you :(. But I wondering, why it's worked till today, although I only made some little changes. – Kooki Dec 19 '12 at 13:22

0 Answers0