[Mono-bugs] [Bug 500074] XmlDocument.Load() fails with System.Net.WebException: Error: NameResolutionFailure

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Sat May 2 11:45:59 EDT 2009


User pete.grace at gmail.com added comment

Peter Grace <pete.grace at gmail.com> changed:

           What    |Removed                     |Added
             Status|NEEDINFO                    |NEW
      Info Provider|pete.grace at gmail.com        |

--- Comment #2 from Peter Grace <pete.grace at gmail.com>  2009-05-02 09:45:58 MDT ---
Problem does appear to be in System.Net.HttpWebRequest:

pgrace at garden:~/mete$ mono httpwebreq.exe

Unhandled Exception: System.Net.WebException: Error: NameResolutionFailure
  at System.Net.HttpWebRequest.EndGetResponse (IAsyncResult asyncResult)
  at System.Net.HttpWebRequest.GetResponse () [0x00000]
  at HttpWebReqTestCase.MaybeDNSError.Main (System.String[] args) [0x00000]

Code used:

using System;
using System.Net;

namespace HttpWebReqTestCase {
    class MaybeDNSError {
        public static void Main(string[] args)
            HttpWebRequest req =

            HttpWebResponse resp = (HttpWebResponse)req.GetResponse();

            string[] names = resp.Headers.AllKeys;

            Console.WriteLine("{0,-20}{1}\n", "Name", "Value");
            foreach (string n in names)
                Console.WriteLine("{0,-20}{1}", n, resp.Headers[n]);



And to show that dns does in fact work on this system:

pgrace at garden:~/mete$ host www.google.com
www.google.com is an alias for www.l.google.com.
www.l.google.com has address
www.l.google.com has address
www.l.google.com has address
www.l.google.com has address

Configure bugmail: http://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.

More information about the mono-bugs mailing list