locked
Trouble getting response through Web RRS feed

  • Question

  • Hi,

      I started making a Mobile Application for windows mobile I am getting error for WebResponse. I can pull up websites from the Device Emulator's browser but can't get the response within the application. Here is my code

    string url = "http://newsrss.bbc.co.uk/rss/newsonline_world_edition/front_page/rss.xml";
                try
                {
                    HttpWebRequest wr = (HttpWebRequest)WebRequest.Create(url);
                    WebResponse resp = wr.GetResponse(); //The remote name could not be resolved error
                    Stream stream = resp.GetResponseStream();
                    XmlTextReader reader = new XmlTextReader(stream);
                    reader.XmlResolver = null; // ignore the DTD
                    reader.WhitespaceHandling = WhitespaceHandling.None;
                    dgNews.DataSource = RSSToCollection(reader);
                    dgNews.Refresh();
                }
                catch (Exception ex)
                {
                }
    It gives me error while collecting web response. The emulator is cradled to the internet and websites come on on the emulator's browser. What's the issue?
    Ammar Hassan
    Monday, January 11, 2010 3:53 AM

Answers

  • But I am able to open this on my local browser :-S
    Ammar Hassan
    • Marked as answer by progrAMMAR Tuesday, January 12, 2010 5:35 AM
    Monday, January 11, 2010 5:28 AM

All replies

  • May Be some restriction is there to access the news URL.

    try to contact your system administrator.

    Hope this my be help.

    If you find my post is helpful for you then mark as a answer.
    Monday, January 11, 2010 5:05 AM
  • But I am able to open this on my local browser :-S
    Ammar Hassan
    • Marked as answer by progrAMMAR Tuesday, January 12, 2010 5:35 AM
    Monday, January 11, 2010 5:28 AM
  • But I am able to open this on my local browser :-S
    Ammar Hassan

    What exact problem you are facing ? your code working perfect .

    If you find my post is helpful for you then mark as a answer.
    Monday, January 11, 2010 6:07 AM