[Mono-bugs] [Bug 533882] New: HttpWebRequest fails inside a ASP.NET page: Socket::CheckProtocolSupport()

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Mon Aug 24 17:19:15 EDT 2009


           Summary: HttpWebRequest fails inside a ASP.NET page:
    Classification: Mono
           Product: Mono: Runtime
           Version: 2.4.x
          Platform: x86-64
        OS/Version: Linux
            Status: NEW
          Severity: Normal
          Priority: P5 - None
         Component: JIT
        AssignedTo: lupus at novell.com
        ReportedBy: gonzalo at novell.com
         QAContact: mono-bugs at lists.ximian.com
          Found By: ---

Save the following code to 'index.aspx' and run xsp2. Then go with your browser
<%@ Page %>
<%@ Import namespace="System.Net" %>
<script runat="Server">
    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;
<asp:Label id="lblText" runat="server" />
----------END index.aspx---------------

When running it in an amd64 mono, this fails because of a nullref in
System.Net.Sockets::CheckProtocolSupport when SettingsSection is null. Running
the same thing in a 32-bits mono works fine.

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

More information about the mono-bugs mailing list