[Mono-bugs] [Bug 323375] HttpWebRequest does not authenticate via NTLM

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Wed Jul 30 18:03:57 EDT 2008


https://bugzilla.novell.com/show_bug.cgi?id=323375

User miguel at novell.com added comment
https://bugzilla.novell.com/show_bug.cgi?id=323375#c14





--- Comment #14 from Miguel de Icaza <miguel at novell.com>  2008-07-30 16:03:57 MDT ---
This updated version of the program shows a more disturbing trend:

monmono$ mono uu.exe 
fail
fail
fail
fail
fail
fail
fail
fail
fail
fail
OK
fail
OK

Then it hangs there.

using System;
using System.Text;
using System.Net;

namespace ntlm_auth
{
    public class NtlmAuthTests
    {

        const string URL = "http://ntlmauth.omni-ts.com/";
        const string USERID = "mono";
        const string PASSWD = "mono";

            static void Main ()
                    {
                            Valid ();
                    }

        static public void Valid()
        {
        while (true){
            WebRequest req = WebRequest.Create(URL);

            req.Credentials = new NetworkCredential(USERID, PASSWD,
string.Empty);

                try {
            HttpWebResponse resp = (HttpWebResponse)req.GetResponse();
            Console.WriteLine (resp.StatusCode);
                } catch { Console.WriteLine ("fail"); continue; }

        }
        }
    }
}


-- 
Configure bugmail: https://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