[Mono-devel-list] HTTPS Post

Sébastien Pouliot spouliot at videotron.ca
Fri Jun 17 10:26:02 EDT 2005


Hello Jeff,

The stack trace would have been useful but this is (most probably) a trust
issue. Please have a look at
http://www.mono-project.com/FAQ:_Security
for more details. If it still doesn't work then open a bug report on
bugzilla.ximian.com

Sebastien Pouliot
home: spouliot at videotron.ca
blog: http://pages.infinit.net/ctech/poupou.html


> -----Original Message-----
> From: mono-devel-list-bounces at lists.ximian.com
> [mailto:mono-devel-list-bounces at lists.ximian.com]On Behalf Of Jeff
> Tickle
> Sent: 17 juin 2005 10:08
> To: mono-devel-list at lists.ximian.com
> Subject: [Mono-devel-list] HTTPS Post
>
>
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Not sure if it's a bug or just my lack of understanding of security, but
> the fact is, this code works without fail in .NET, but not in Mono:
>
> using System;
> using System.IO;
> using System.Net;
>
> public class Test {
>     public static void Main(string[] args)
>     {
>         try {
>             WebRequest request =
> WebRequest.Create("https://api.safepages.com/process.pl");
>             request.Method = "POST";
>             request.ContentType = "application/x-www-form-urlencoded";
>             byte[] bytes =
> System.Text.Encoding.UTF8.GetBytes("action=dialup_add&mode=test");
>             request.ContentLength = bytes.Length;
>             Stream s = request.GetRequestStream();
>             s.Write(bytes,0,bytes.Length);
>             s.Close();
>             Console.WriteLine(new
> StreamReader(request.GetResponse().GetResponseStream()).ReadToEnd());
>         } catch (WebException e) {
>             Console.WriteLine(e);
>         }
>     }
> }
>
> It should return an error saying that the login was invalid.  Instead it
> throws an exception, and the stack trace suggests it has to do with a
> failure to agree on security.
>
> I did read a bit on certmgr.  I tried importing the certificate of this
> particular site, but it wouldn't go anywhere but the AddressBook and
> didn't seem to make a difference.
>
> Thanks for any help!
>
> - -Jeff
>
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.1 (GNU/Linux)
> Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org
>
> iD8DBQFCstk5L5ulKJitYLoRAqj1AJwMbnclw2rju/Vm1Hs1paEBN7SqJACgnErq
> QF+8C0d/3cwQtI+RPN4S39c=
> =7ui8
> -----END PGP SIGNATURE-----
> _______________________________________________
> Mono-devel-list mailing list
> Mono-devel-list at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-devel-list




More information about the Mono-devel-list mailing list