Mono, HttpWebRequest and https/ssl

I just spent the better part of a week tracking down bugs in Mono and a custom application of mine (which I’m porting to Mono). I was having a rough time with some code working against a secure server. After reading this, this, and this, it finally works.

Bottom line: If you’re working with HttpWebRequest and trying to connect via SSL, you need to make sure that you tell System.Net to trust all certificates, especially if you’re developing a non-interactive daemon. There’s nothing more frustrating then spending hour upon hour tracking down why your code won’t work like it did under .NET, only to find out a few lines of code fixes it straightaway.

One thought on “Mono, HttpWebRequest and https/ssl

  1. hi, i’m trying to do an app, which would be able to send a https form, (login) and then recovery the user-specific pages. i’ve followed your links, but i haven’t found information about. Can you help me? or at least, show or send this part of your code? Thanks

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>