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

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Sun Jul 12 18:11:50 EDT 2009


User novell at pasichnyk.net added comment

Jesse Pasichnyk <novell at pasichnyk.net> changed:

           What    |Removed                     |Added
             Status|RESOLVED                    |REOPENED
                 CC|                            |novell at pasichnyk.net
         Resolution|INVALID                     |

--- Comment #4 from Jesse Pasichnyk <novell at pasichnyk.net>  2009-07-12 16:11:47 MDT ---
I'm still having this same issue.

I receive a NameResoultionFailure when running this code inside a website,
using Xsp2 or fastcgi-mono-server2.  However the code works fine inside a
standalone console application, as Gonzalo has noted.

The code posted earlier when run in a standalone console app gives:

Name                Value

Cache-Control       private, max-age=0
Date                Sun, 12 Jul 2009 22:10:35 GMT
Expires             -1
Content-Type        text/html; charset=ISO-8859-1
expires=Tue, 12-Jul-2011 22:10:35 GMT; path=/; domain=.google.com
Server              gws
Transfer-Encoding   chunked

The following code, hosted in xsp2 (as root, to ensure no permission issues)
gives an exception:

using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Net;

public partial class _Default : System.Web.UI.Page 
    Label lblText;

    protected void Page_Load(object sender, EventArgs e)
        lblText.Text = GetText();

    private string GetText()
        HttpWebRequest req =
        HttpWebResponse resp = (HttpWebResponse)req.GetResponse();

        string[] names = resp.Headers.AllKeys;

       string text = string.Format("{0,-20}{1}\n", "Name", "Value");

        foreach (string n in names)
            text += string.Format("{0,-20}{1}", n, resp.Headers[n]);


        return text;

Server Error in '/' Application


Error: NameResolutionFailure
Description: HTTP 500. Error processing request.

Stack Trace: 

System.Net.WebException: Error: NameResolutionFailure
  at System.Net.HttpWebRequest.EndGetResponse (IAsyncResult asyncResult)
  at System.Net.HttpWebRequest.GetResponse () [0x00000] 
  at _Default.GetText () [0x00000] 
  at _Default.Page_Load (System.Object sender, System.EventArgs e) [0x00000] 
  at System.Web.UI.Control.OnLoad (System.EventArgs e) [0x00000] 
  at System.Web.UI.Control.LoadRecursive () [0x00000] 
  at System.Web.UI.Page.ProcessLoad () [0x00000] 
  at System.Web.UI.Page.ProcessPostData () [0x00000] 
  at System.Web.UI.Page.InternalProcessRequest () [0x00000] 
  at System.Web.UI.Page.ProcessRequest (System.Web.HttpContext context)

Version information: Mono Version: 2.0.50727.1433; ASP.NET Version:

This error is completely blocking me from going forward with using Mono on my
current project.  Please let me know if there is any other info you need to
troubleshoot/resolve the issue.


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